Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: improve the TonicRpcClient so it doesn't rely so much on feature flags #766

Open
tomyrd opened this issue Feb 26, 2025 · 0 comments

Comments

@tomyrd
Copy link
Collaborator

tomyrd commented Feb 26, 2025

When deduplicating the code for the rpc client implementations in #744 we had to add a lot of conditional compilation for it to work, we should look for a way where we don't duplicate code but also don't rely so much on feature flags to solve compilation problems.

I still don't love the fact that we need to rely on feature flags this much in order to avoid falling into problems such as duplicate declarations, missing imports/exports, etc. However I do think that the deduplication is a net win here.
I briefly tried to generalize it without the feature flags but it becomes verbose too fast (hard to make generic over ApiClient because of the inner guards defined by tonic). So could we create an issue to keep this in the backlog as we merge this?

Originally posted by @igamigo in #744 (review)

Additional context and ideas can be found in this other comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant