-
Notifications
You must be signed in to change notification settings - Fork 105
Build failure: Dependency conflict on time crate (between 0.3.45 and 0.3.46) #621
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
I am encountering a dependency resolution error when trying to build the project using cargo build.
Cargo fails to select a compatible version for the time crate. It appears that zip v7.3.0 strictly requires time =0.3.45, while another dependency in the tree (or the lockfile) has selected time 0.3.46.
To Reproduce
Run cargo build with the latest dependencies.
Error Log
Here is the output from Cargo:
error: failed to select a version for `time`.
... required by package `zip v7.3.0`
... which satisfies dependency `zip = "^7.3.0"` of package XXXX
versions that meet the requirements `=0.3.45` are: 0.3.45
all possible versions conflict with previously selected packages.
previously selected package `time v0.3.46`
... which satisfies dependency `time = "^0.3.46"` of package XXXX
failed to select a version for `time` which could resolve this conflict
Possible Solution
remove '=' from :
time = { version = "=0.3.45", default-features = false, optional = true, features = [
"std",
] }
time = { version = "=0.3.45", features = ["formatting", "macros"] }
clap = { version = "=4.4.18", features = ["derive"] }I think that fixing/pinning crate versions (using =) risks causing recurring dependency conflicts in the future. By restricting a dependency to a specific patch version, it prevents Cargo's resolver from finding a common version when multiple packages share the same dependency. It might be better to use a more flexible version range.
Thanks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working