Byron / google-apis-rs

A binding and CLI generator for all Google APIs
http://byron.github.io/google-apis-rs
Other
983 stars 132 forks source link

cannot compile google-drive3 #480

Closed cemoktra closed 4 months ago

cemoktra commented 4 months ago

Version: google-drive3-5.0.4+20240227

error[E0433]: failed to resolve: could not find `standard_base64` in `serde`
    --> /home/cemoktra/.cargo/registry/src/index.crates.io-6f17d22bba15001f/google-drive3-5.0.4+20240227/src/api.rs:2229:1
     |
2229 | #[serde_with::serde_as(crate = "::client::serde_with")]
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `standard_base64` in `serde`
     |
     = note: this error originates in the attribute macro `serde_with::serde_as` (in Nightly builds, run with -Z macro-backtrace for more info)
Byron commented 4 months ago

Thanks for letting me know!

cargo update should resolve the problem, and future releases won't have it either. The current release cannot be fixed though.

cemoktra commented 4 months ago

i updated google-apis-common to 6.0.3 but it still fails to compile:

error[E0433]: failed to resolve: could not find `serdce_as` in `serde_with`
    --> /home/cemoktra/.cargo/registry/src/index.crates.io-6f17d22bba15001f/google-drive3-5.0.4+20240227/src/api.rs:2229:15
     |
2229 | #[serde_with::serdce_as(crate = "::client::serde_with")]
     |               ^^^^^^^^^ could not find `serdce_as` in `serde_with`

error: cannot find attribute `serde_as` in this scope
    --> /home/cemoktra/.cargo/registry/src/index.crates.io-6f17d22bba15001f/google-drive3-5.0.4+20240227/src/api.rs:2234:7
     |
2234 |     #[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
     |       ^^^^^^^^
     |
help: consider importing this attribute macro
     |
1    + use crate::api::serde_with::serde_as;
cemoktra commented 4 months ago

i guess somewhere is a type cause serdce_as seems invalid

Byron commented 4 months ago

Does this work for you?

cargo install google-drive3-cli

It worked for me so I assumed compilation works with latest dependencies.

Maybe serde also needs to be update? Does a blank cargo update fix it for you (probably copy the Cargo.lock before so you can compare or try different things later)? If so, this means another dependency in Cargo.toml needs to be updated, which would mean this issue isn't actually fixed.

If that's the case, maybe you can trial-and-error your way to finding the dependency - serde or serd_derive would be good candidates.

Will reopen once I hear from you - thanks for your help.

cemoktra commented 4 months ago

I guess i had the api.rs open and accidentally pressed the c at some point in time to make it serdce_as. Sorry