abdolence / gcloud-sdk-rs

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

0.25.5 and above, google-bigtable-v2 feature does not compile #168

Closed KacperTlusty closed 2 days ago

KacperTlusty commented 5 days ago

Hey,

Thanks for your amazing work! Recently I've found out when trying to upgrade that switching from 0.25.4 to any above version will cause errors when google-bigtable-v2 feature is enabled.

Minimal repro setup for that issue:

/
  /src
    /main.rs
  /Cargo.toml

Cargo.toml

[package]
name = "minimum_repro"
version = "0.1.0"

[dependencies]
gcloud-sdk = { version = "0.25.8", features = ["google-bigtable-v2"] }
> cargo check
    Checking gcloud-sdk v0.25.8
error[E0412]: cannot find type `Date` in module `super::super::super::r#type`
   --> /Users/kacpertlusty/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gcloud-sdk-0.25.8/src/../genproto/google.bigtable.v2.rs:462:48
    |
462 |         DateValue(super::super::super::r#type::Date),
    |                                                ^^^^ not found in `super::super::super::r#type`
    |
help: consider importing one of these structs
    |
426 +     use crate::google::bigtable::v2::r#type::Date;
    |
426 +     use chrono::Date;
    |
help: if you import `Date`, refer to it directly
    |
462 -         DateValue(super::super::super::r#type::Date),
462 +         DateValue(Date),
    |

For more information about this error, try `rustc --explain E0412`.
error: could not compile `gcloud-sdk` (lib) due to 1 previous error

I've tried that with 2015 and 2021 Rust edition.

> rustc --version
rustc 1.82.0 (f6e511eec 2024-10-15)
> cargo --version
cargo 1.82.0 (8f40fc59f 2024-08-21)
abdolence commented 5 days ago

Hey, sometimes dependencies between google features break, thanks for reporting it!

I think I've fixed this in #169

Please try to update your dependency in Cargo.yaml directly to a master branch (or commit hash) on GitHub and let me know if it helps in your case.

If it works it will be released at the beginning of next month (which is a common cycle that I try to support).

KacperTlusty commented 2 days ago

I confirm, it works like a charm, thanks for so quick answer!