Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to compile deltalake crate, need to update dynamodb_lock in crates.io #1002

Closed
HuaHuaY opened this issue Dec 7, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@HuaHuaY
Copy link

HuaHuaY commented Dec 7, 2022

Environment

Delta-rs version: rust-v0.5.0

Binding: Rust

Environment:

  • Cloud provider:
  • OS: MacOS
  • Other:

Bug

What happened:

Fail to compile deltalake crate in crates.io with feature "s3".

   Compiling lz4 v1.24.0
   Compiling dynamodb_lock v0.4.1
   Compiling zstd v0.11.2+zstd.1.5.2
error[E0308]: mismatched types
    --> /Users/huahua/.cargo/registry/src/github.com-1ecc6299db9ec823/deltalake-0.5.0/src/storage/s3.rs:523:17
     |
522  |             let lock_client = dynamodb_lock::DynamoDbLockClient::new(
     |                               -------------------------------------- arguments to this function are incorrect
523  |                 dynamodb_client,
     |                 ^^^^^^^^^^^^^^^ expected struct `rusoto_dynamodb::generated::DynamoDbClient`, found struct `DynamoDbClient`
     |
     = note: struct `DynamoDbClient` and struct `rusoto_dynamodb::generated::DynamoDbClient` have similar names, but are actually distinct types
note: struct `DynamoDbClient` is defined in crate `rusoto_dynamodb`
    --> /Users/huahua/.cargo/registry/src/github.com-1ecc6299db9ec823/rusoto_dynamodb-0.48.0/src/generated.rs:6449:1
     |
6449 | pub struct DynamoDbClient {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^
note: struct `rusoto_dynamodb::generated::DynamoDbClient` is defined in crate `rusoto_dynamodb`
    --> /Users/huahua/.cargo/registry/src/github.com-1ecc6299db9ec823/rusoto_dynamodb-0.46.0/src/generated.rs:6449:1
     |
6449 | pub struct DynamoDbClient {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `rusoto_dynamodb` are being used?
note: associated function defined here
    --> /Users/huahua/.cargo/registry/src/github.com-1ecc6299db9ec823/dynamodb_lock-0.4.1/src/lib.rs:341:12
     |
341  |     pub fn new(client: DynamoDbClient, opts: DynamoDbOptions) -> Self {
     |            ^^^

For more information about this error, try `rustc --explain E0308`.
error: could not compile `deltalake` due to previous error
warning: build failed, waiting for other jobs to finish...

What you expected to happen:

Compile successfully.

How to reproduce it:

  1. run cargo new
  2. add a dependence in Cargo.toml:
        [package]
        name = "test_delta_lake"
        version = "0.1.0"
        edition = "2021"
        
        # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
        
        [dependencies]
        deltalake = { version = "0.5.0", features = ["s3"] }
  3. compile

More details:

The reason is that dynamodb_lock in crates.io is too old. It only has a 0.46 version of rusoto_dynamodb . When 0.5.0 version of deltalake was released, the dynamodb_lock in this depository had a upgraded 0.48 version of rusoto_dynamodb. So we can compile this deposiory successfully. But when we use deltalake in crates.io, it will use the dynamodb_lock in crates.io, which is outdated. So it will fail to compile.

@HuaHuaY HuaHuaY added the bug Something isn't working label Dec 7, 2022
@HuaHuaY
Copy link
Author

HuaHuaY commented Dec 7, 2022

duplicate with #973, closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant