-
Notifications
You must be signed in to change notification settings - Fork 416
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
deltalake-*
crates use different version than specified in Cargo.toml
, leading to unexpected behavior
#2847
Comments
Unfortunately, even when specifying the dependencies this way: deltalake = { version = "0.18.2", default-features = false, features = ["azure", "deltalake-aws", "s3"] } You'll end up with a similar |
@yonipeleg33 I think the imprecise version range in the |
@rtyler thank you for the quick response!
I originally used the re-exported features from deltalake, as shown in my second comment (#2847 (comment)). |
When using the |
I tried with this deltalake = { version = "0.18.2", default-features = false, features = ["s3"] } And this fn main() {
deltalake::aws::register_handlers(None);
let aws_url = url::Url::parse("s3://foo/bar").unwrap();
let aws_err = deltalake::storage::store_for(&aws_url).unwrap_err();
assert!(matches!(aws_err, deltalake::DeltaTableError::InvalidTableLocation(_)));
} Then running:
The issue sill reproduces, and I still see the same entries in my |
I was not able to reproduce with: [package]
name = "issue-2847"
version = "0.1.0"
edition = "2021"
[dependencies]
deltalake = { version = "0.18.2", features = ["s3"] }
url = "2.5.2" fn main() {
println!("Start");
deltalake::aws::register_handlers(None);
let aws_url = url::Url::parse("s3://foo/bar").unwrap();
let aws_err = deltalake::storage::store_for(&aws_url).unwrap_err();
assert!(matches!(aws_err, deltalake::DeltaTableError::InvalidTableLocation(_)));
println!("Go go go!");
}
|
This might be confusing, maybe I should've provided a code that fails rather than passes to showcase the error 🙂 This code is probably less confusing - try this one instead: fn main() -> Result<(), DeltaTableError> {
deltalake::aws::register_handlers(None);
let aws_url = url::Url::parse("s3://foo/bar").unwrap();
deltalake::storage::store_for(&aws_url)?;
println!("it works!"); // fails before this line :(
Ok(())
} |
deltalake-*
crates uses different version than specified in Cargo.toml
, leading to unexpected behaviordeltalake-*
crates use different version than specified in Cargo.toml
, leading to unexpected behavior
Okay, I have replicated the issue. I did mess up some of the version ranges previously and the 0.19.0 release does fix the problem you describe |
Yeah, but IIUC, it works because this is currently the latest version. |
The same code with 0.17.3 fails as well, checked now |
Looking at the deltalake = { version = "0.18.2", default-features = false }
deltalake-aws = "0.1.4" There's a root dependency of Considering the version range in the deltalake-aws crates This appears to be because Cargo treats all minor versions under That's annoying, and another good reason for us to consider pushing to 1.0 across the board 😄 |
Until we release 1.0, every 0.x release is going to be treated as a "major" or incompatible change by Cargo Fixes delta-io#2847
@rtyler Thank you for handling this so quickly, I see the draft PR! 👀
I think this is more about semver compatibility rather than incompatibility: Cargo sees that
|
Until we release 1.0, every 0.x release is going to be treated as a "major" or incompatible change by Cargo Fixes #2847
Environment
Delta-rs version:
0.18.2, 0.19.0 (you'll see below how 😄 )
Binding:
Rust
Environment:
Bug
What happened:
Having these dependencies in
Cargo.toml
:Results in two
deltalake-core
versions being used: 0.18.2, and 0.19.0.From my
Cargo.lock
:This state leads to unexpected behavior. I can imagine there are other scenarios that it affects, but the one I stumbled upon is
register_handlers
:When calling
deltalake_*::register_handlers
, it registers the handlers by callingdeltalake_core::storage::factories
- which will be version 0.19.0 in my case.Then, calling
deltalake::storage::store_for
, goes to the 0.18.2 version, as specified in myCargo.toml
- this is a different source code, on which the handlers are not registered!So I end up as if I didn't call
register_handlers
at all, and getInvalidTableLocation
error 😞Everything works fine if I bump my
deltalake
dependency to 0.19.0.What you expected to happen:
This scenario wouldn't be possible - Either such side effects of using multiple versions of deltalake-core don't exists, or - preferably - I shouldn't end up with multiple versions of delalake-core in such a naive setup (unless I explicitly want to).
How to reproduce it:
Cargo.toml
- have the following dependencies:main.rs
:More details:
Maybe I'm stepping out of line here, but I think the deltalake-* crates shouldn't allow a range of versions as they do today (see here for example).
The text was updated successfully, but these errors were encountered: