abdolence / gcloud-sdk-rs

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

Feature tls-webpki-roots causes duplicate definition #160

Closed waywardcoder closed 1 month ago

waywardcoder commented 1 month ago

I was building off the example for gcp secrets and when enabling feature tls-webpki-roots like the example i get an error that duplicate definitions exist:

error[E0592]: duplicate definitions with name init_tls_config --> /Users/chrisdupuy-admin/.cargo/git/checkouts/gcloud-sdk-rs-492432f787671ff2/4f4ba97/gcloud-sdk/src/api_client.rs:231:5 | 224 | fn init_tls_config(domain_name: String) -> tonic::transport::ClientTlsConfig { | ---------------------------------------------------------------------------- other definition for init_tls_config ... 231 | fn init_tls_config(domain_name: String) -> tonic::transport::ClientTlsConfig { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for init_tls_config

when looking at the code it does appear both are included unless you use tls-roots:

image

abdolence commented 1 month ago

To be able to use another TLS config you need to disable default-features since it has conflicting feature.

waywardcoder commented 1 month ago

Thank you! Sorry i missed that in the cargo.toml

abdolence commented 1 month ago

No worries, I know the addictive nature of Cargo features might be quite frustrating, especially through transitive dependencies.