lquerel / gcp-bigquery-client

GCP BigQuery Client (Rust)
Apache License 2.0
92 stars 60 forks source link

[BUG FIX] Fixes incompatibility with dependencies causing latest version to be broken #20

Closed MathiasKindberg closed 2 years ago

MathiasKindberg commented 2 years ago

There's an incompatibility with the dependencies. This PR fixes that, and also updates the time and oath crates for good measure.

For me this was encountered by simply doing a cargo update, so there's something not correctly pinned going on in the background causing this.

Building the latest master gives the following error.

error[E0308]: mismatched types
  --> src/auth.rs:43:37
   |
43 |                 auth: Some(Arc::new(auth)),
   |                                     ^^^^ expected struct `HttpsConnector`, found struct `hyper_rustls::connector::HttpsConnector`
   |
   = note: expected struct `Authenticator<HttpsConnector<HttpConnector>>`
              found struct `Authenticator<hyper_rustls::connector::HttpsConnector<HttpConnector>>`
   = note: perhaps two different versions of crate `hyper_rustls` are being used?

For more information about this error, try `rustc --explain E0308`.
error: could not compile `gcp-bigquery-client` due to previous error

From the cargo.lock file being generated we can see that this is due to reqwest and yup-oauth2 requiring 0.23.0.

[[package]]
name = "reqwest"
version = "0.11.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb"
dependencies = [
 [...]
 "hyper-rustls 0.23.0",
 [...]
]

[[package]]
name = "yup-oauth2"
version = "6.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73b8e9dfff61fb272cffb4b4219893ab69e9b5a766e0d1958eefb14fb25dd59c"
dependencies = [
 [...]
 "hyper-rustls 0.23.0",
 [...]
]

While this crate requires 0.22.1

[[package]]
name = "gcp-bigquery-client"
version = "0.12.0"
dependencies = [
 [...]
 "hyper-rustls 0.22.1",
 [...]
]
lquerel commented 2 years ago

LGTM. Sorry for the delay.

lquerel commented 2 years ago

Version 0.12.1 published. Thanks.