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 your crate has multiple versions of Arrow (for example, to allow FFI between various versions of Arrow and Polars like this crate), Arrow 55 throws an error. Arrow 50, 51, 52, 53, 54 can be placed in the same crate, arrow 54 and 55 also work together, but you can't have 55 with any of the ones prior to 54. It throws this error:
error[E0034]: multiple applicable items in scope
--> /home/eric/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/arrow-arith-53.4.0/src/temporal.rs:91:36
|
91 | DatePart::Quarter => |d| d.quarter() as i32,
| ^^^^^^^ multiple `quarter` found
|
note: candidate #1 is defined in the trait `ChronoDateExt`
--> /home/eric/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/arrow-arith-53.4.0/src/temporal.rs:637:5
|
637 | fn quarter(&self) -> u32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in the trait `Datelike`
--> /home/eric/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.40/src/traits.rs:47:5
|
47 | fn quarter(&self) -> u32 {
| ^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the method for candidate #1
|
91 - DatePart::Quarter => |d| d.quarter() as i32,
91 + DatePart::Quarter => |d| ChronoDateExt::quarter(&d) as i32,
|
help: disambiguate the method for candidate #2
|
91 - DatePart::Quarter => |d| d.quarter() as i32,
91 + DatePart::Quarter => |d| Datelike::quarter(&d) as i32,
|
For more information about this error, try `rustc --explain E0034`.
error: could not compile `arrow-arith` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
To Reproduce
You can recreate by creating a new crate with these dependencies in the Cargo.toml and running cargo build.
[dependencies]
arrow_53 = { package = "arrow", version = "53"}
arrow_54 = { package = "arrow", version = "54"}
arrow_55 = { package = "arrow", version = "55"}
Expected behavior
Expected that multiple versions of Arrow should be able to be placed in the same crate.
Additional context
Not all crates update at the same rate and having an ability to convert some Arrow 53 data into Arrow 55 data (with FFI) is useful for an integrated ecosystem.
The text was updated successfully, but these errors were encountered:
The error is due to a breaking change chrono made in a patch version, you may be able to workaround it by pinning the chrono version but I suspect this may not be possible.
Changing this to an enhancement as this isn't a bug, nor something we try to guarantee, although I can see the advantages.
Describe the bug
When your crate has multiple versions of Arrow (for example, to allow FFI between various versions of Arrow and Polars like this crate), Arrow 55 throws an error. Arrow 50, 51, 52, 53, 54 can be placed in the same crate, arrow 54 and 55 also work together, but you can't have 55 with any of the ones prior to 54. It throws this error:
To Reproduce
You can recreate by creating a new crate with these dependencies in the
Cargo.toml
and runningcargo build
.Expected behavior
Expected that multiple versions of Arrow should be able to be placed in the same crate.
Additional context
Not all crates update at the same rate and having an ability to convert some Arrow 53 data into Arrow 55 data (with FFI) is useful for an integrated ecosystem.
The text was updated successfully, but these errors were encountered: