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

Using tonic for clients still pulls in extra dependencies #1014

Open
djc opened this issue Jun 13, 2022 · 6 comments
Open

Using tonic for clients still pulls in extra dependencies #1014

djc opened this issue Jun 13, 2022 · 6 comments

Comments

@djc
Copy link
Contributor

djc commented Jun 13, 2022

From my comment in #959 (comment):

I finally tried using #960 and I don't think it's an adequate fix. First of all, the tls feature still pulls in transport, so by default if you pull in tls or one of the features that depend on it, you'll still get the server-side dependencies. That part can actually be worked around by depending on the other required features directly, but then I noticed that the entire tonic::transport module is unavailable if the transport feature is disabled, so I don't have access to things like Error, Channel or Endpoint from that module.

Should I submit a PR replacing the use of transport internally with channel for client-side or both-side items?

@LucioFranco
Copy link
Member

Ugh yeah seems like a mess, honestly, I would just use tonic without the transport module. Its still a bit of a mess but will allow you better fine grained control over what you pull in. Is this change for something internal or is it in a public repo?

@djc
Copy link
Contributor Author

djc commented Jun 15, 2022

Something internal, though it's probably also relevant for parts of opentelemetry-rust (notably, opentelemetry-stackdriver).

@LucioFranco
Copy link
Member

Do you think migrating to using hyper is feasible?

@LucioFranco
Copy link
Member

I wrote this PR that should make using hyper directly much easier #1017

@djc
Copy link
Contributor Author

djc commented Jun 30, 2022

Is there any example code for using tonic without the transport stuff?

@LucioFranco
Copy link
Member

@djc the rustls examples under the tls folder has examples of using hyper. In general, it should just work, except servers don't provide the make service portion.

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

2 participants