try to get identity service config from json file if it exists, otherwise just use default config
Depends on D10187
Differential D10201
b[native] configure socket address on native with json file varun on Dec 5 2023, 8:39 PM. Authored by Tags None Referenced Files
Details
Diff Detail
Event TimelineComment Actions i meant to make this a draft diff.. i guess i can't undo that now. @bartek i'm having trouble reading from my native/facts/identity_service_config.json file because we build the native rust library and then Xcode links it in some sort of sandbox where the file isn't present. any thoughts on how to proceed here? i can just set the SOCKET_ADDR const in build.rs similar to how we set CODE_VERSION but wondering if there's a cleaner way... Comment Actions That diff is for keyserver only. Native apps don't support reading env vars in runtime - their runtime is smartphone or simulator, they should be separated from host machine. Also reading file at runtime on mobile app means searching for it on the device's disk (or emulator-specific directories). build.rs will work but it's cumbersome to rebuild native app just to change identity endpoint. On the other hand, passing values JS -> Rust sounds like lots of additional work (or am I wrong?). Wondering if there's a better solution. Comment Actions Thanks for clarifying, @bartek! I definitely got myself confused there. We don't use getCommConfig in JS on native currently either, so I don't think there's any expectation to use get_config in Rust on native. I share your concerns that build.rs is an unideal place to put this config, but I'm not sure of any alternatives. Don't want to block this diff if there are no obvious alternatives. Comment Actions thanks for explaining, @bartek :)
yeah it feels like a lot of unnecessary work... i'm think this task would make it easier though: https://linear.app/comm/issue/ENG-6026/avoid-creating-new-clients-each-time-we-call-grpc-client-methods I'm going to abandon this diff and just update the previous one because i had to completely change my approach |