abdolence / gcloud-sdk-rs

Async Google Cloud Platform (GCP) gRPC/REST APIs client implementation based on Tonic middleware and Reqwest.
Apache License 2.0
73 stars 22 forks source link

duplicate definitions for `init_tls_config` #155

Closed markuskobler closed 4 months ago

markuskobler commented 4 months ago

Since upgrading gcloud-sdk to (0.25.2) and a number of dependent packages my app refuses to build because of overlapping init_tls_config implementations. In my case I specifically want to use tls-webpki-roots and not tls-roots.

220 |     fn init_tls_config(domain_name: String) -> tonic::transport::ClientTlsConfig {
    |     ---------------------------------------------------------------------------- other definition for `init_tls_config`
...
227 |     fn init_tls_config(domain_name: String) -> tonic::transport::ClientTlsConfig {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for `init_tls_config`

Do you have any suggestions for forcing gcloud-sdk to use tls-webpki-roots feature only?

abdolence commented 4 months ago

Hey, can you show me how do you refer to the crate in your application? (Used features and option)

abdolence commented 4 months ago

In general since there is default feature for tls-roots enabled, you need to switch it this way:

gcloud-sdk = { version = "0.25", default-features = false, features = ["google-firestore-v1", "tls-webpki-roots"] }
markuskobler commented 4 months ago

In my own code I'm using it like

gcloud-sdk = { workspace = true, features = ["tls-webpki-roots", "google-pubsub-v1"], default-features = false }

Digging into it more it looks like the issue is with how opentelemetry-gcloud-trace is pulling it in https://github.com/abdolence/opentelemetry-gcloud-trace-rs/blob/master/Cargo.toml#L28

I will file an issue with them

abdolence commented 4 months ago

@markuskobler

Them = is me again :)

Release this to help to fix it: https://github.com/abdolence/opentelemetry-gcloud-trace-rs/releases/tag/v0.11.1

abdolence commented 4 months ago

Thanks for reporting it!

markuskobler commented 4 months ago

If it's not clear I'm a fan of your work I just don't know the full extent 🤣

Just added back the latest gcloud open telemetry release and it's working great!