You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When started a new cargo repo and only add deltalake("0.24.0") and run 'cargo build', build fails with type mismatch errors between [email protected] (via delta_kernel) and [email protected] (direct dependency of deltalake-core):
Compiling deltalake-core v0.24.0
error[E0308]: mismatched types
--> /home/hanbo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deltalake-core-0.24.0/src/kernel/models/actions.rs:567:9
|
566 | fn try_from(value: &TableFeatures) -> Result<Self, Self::Error> {
| ------------------------- expected `Result<ReaderFeatures, strum::ParseError>` because of returntype
567 |ReaderFeatures::try_from(value.as_ref())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `strum::ParseError`, found a different `strum::ParseError`|
= note: `strum::ParseError` and `strum::ParseError` have similar names, but are actually distinct types
note: `strum::ParseError` is defined in crate `strum`
--> /home/hanbo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strum-0.26.3/src/lib.rs:42:1
|
42 | pub enum ParseError {
| ^^^^^^^^^^^^^^^^^^^
note: `strum::ParseError` is defined in crate `strum`
--> /home/hanbo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strum-0.27.1/src/lib.rs:42:1
|
42 | pub enum ParseError {
| ^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `strum` are being used?
error[E0308]: mismatched types
--> /home/hanbo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/deltalake-core-0.24.0/src/kernel/models/actions.rs:575:9
|
574 | fn try_from(value: &TableFeatures) -> Result<Self, Self::Error> {
| ------------------------- expected `Result<WriterFeatures, strum::ParseError>` because of returntype
575 |WriterFeatures::try_from(value.as_ref())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `strum::ParseError`, found a different `strum::ParseError`|
= note: `strum::ParseError` and `strum::ParseError` have similar names, but are actually distinct types
note: `strum::ParseError` is defined in crate `strum`
--> /home/hanbo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strum-0.26.3/src/lib.rs:42:1
|
42 | pub enum ParseError {
| ^^^^^^^^^^^^^^^^^^^
note: `strum::ParseError` is defined in crate `strum`
--> /home/hanbo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strum-0.27.1/src/lib.rs:42:1
|
42 | pub enum ParseError {
| ^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `strum` are being used?
For more information about this error, try `rustc --explain E0308`.
error: could not compile `deltalake-core` (lib) due to 2 previous errors
What you expected to happen: Clean build without version conflicts when adding the deltalake crate as a dependency.
How to reproduce it:
cargo new test_delta
Add deltalake = "0.24.0" to Cargo.toml
Run cargo build
Observe compilation errors about mismatched strum::ParseError types
Also I found a workaround, is to use cargo download to manually download deltalake-core locally, and then modify the Cargo.toml file on the strum dependency from
[dependencies.strum]version = "0"
to
[dependencies.strum]version = "0.26"
and then in the test repo's Cargo.toml file add this patch:
[patch.crates-io]deltalake-core = { path = "/home/hanbo/repositories/deltalake-core-0.24.0", version = "0.24.0" }
and then it can build:
cargo build
Locking 1 package to latest compatible version
Adding deltalake-core v0.24.0 (/home/hanbo/repositories/deltalake-core-0.24.0)
Compiling deltalake-core v0.24.0 (/home/hanbo/repositories/deltalake-core-0.24.0)
warning: static `ARROW_HANDLER` is never used
--> /home/hanbo/repositories/deltalake-core-0.24.0/src/kernel/mod.rs:26:8
|
26 | static ARROW_HANDLER: LazyLock<ArrowExpressionHandler> =
| ^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: static `LOG_SCHEMA` is never used
--> /home/hanbo/repositories/deltalake-core-0.24.0/src/kernel/models/fields.rs:228:8
|
228 | static LOG_SCHEMA: LazyLock<StructType> = LazyLock::new(|| {
| ^^^^^^^^^^
warning: function`log_schema_ref` is never used
--> /home/hanbo/repositories/deltalake-core-0.24.0/src/kernel/models/fields.rs:276:15
|
276 | pub(crate) fn log_schema_ref() -> &'static Arc<StructType> { | ^^^^^^^^^^^^^^warning: function `get_target_file_size` is never used --> /home/hanbo/repositories/deltalake-core-0.24.0/src/operations/mod.rs:355:15 |355 | pub(crate) fn get_target_file_size( | ^^^^^^^^^^^^^^^^^^^^ Compiling deltalake v0.24.0warning: `deltalake-core` (lib) generated 4 warnings Compiling test_delta v0.1.0 (/home/hanbo/repositories/test_delta) Finished `dev` profile [unoptimized + debuginfo] target(s) in 9.67s
The text was updated successfully, but these errors were encountered:
Environment
Delta-rs version:
0.24.0
Binding:
Rust
Environment:
Bug
What happened:
When started a new cargo repo and only add deltalake("0.24.0") and run 'cargo build', build fails with type mismatch errors between [email protected] (via delta_kernel) and [email protected] (direct dependency of deltalake-core):
What you expected to happen: Clean build without version conflicts when adding the deltalake crate as a dependency.
How to reproduce it:
cargo new test_delta
Add deltalake = "0.24.0" to Cargo.toml
Run cargo build
Observe compilation errors about mismatched strum::ParseError types
More details:
The dependency tree shows:
Also I found a workaround, is to use cargo download to manually download deltalake-core locally, and then modify the Cargo.toml file on the strum dependency from
to
and then in the test repo's Cargo.toml file add this patch:
and then it can build:
The text was updated successfully, but these errors were encountered: