Skip to content

Arrow 55 not building with other versions of Arrow #7410

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

Open
EricFecteau opened this issue Apr 13, 2025 · 2 comments
Open

Arrow 55 not building with other versions of Arrow #7410

EricFecteau opened this issue Apr 13, 2025 · 2 comments
Labels
enhancement Any new improvement worthy of a entry in the changelog

Comments

@EricFecteau
Copy link

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:

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.

@tustvold
Copy link
Contributor

tustvold commented Apr 14, 2025

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.

See #7196

@tustvold tustvold added enhancement Any new improvement worthy of a entry in the changelog and removed bug labels Apr 14, 2025
@EricFecteau
Copy link
Author

Unfortunately, this does not work because the latest version of arrow depends on chrono ^0.4.40.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

No branches or pull requests

2 participants