leptonic icon indicating copy to clipboard operation
leptonic copied to clipboard

Conflicting dependencies

Open Benji377 opened this issue 1 year ago • 2 comments
trafficstars

When using your library in combination with other crates, like the zip crate for example, both depend on the time crate, but with different versions. This creates a dependency conflict in my project:

error: failed to select a version for `time`.                                                                                                                                      
    ... required by package `zip v2.0.0`
    ... which satisfies dependency `zip = "^2.0.0"` of package `raspirus v1.2.0 (C:\...\Raspirus\src-tauri)`
versions that meet the requirements `^0.3.36` are: 0.3.36

all possible versions conflict with previously selected packages.

  previously selected package `time v0.3.31`
    ... which satisfies dependency `time = "=0.3.31"` of package `leptonic v0.5.0`
    ... which satisfies dependency `leptonic = "^0.5.0"` of package `raspirus-ui v0.1.0 (C:\...\Raspirus)`

failed to select a version for `time` which could resolve this conflict

You can reproduce this issue by modifying the tauri-template provided here and add the zip crate to the src-tauri module.

The issue is also documented on the cargo and a potential solution could be to use a tool like cargo-semver-check to find these issues before releasing the library.

Benji377 avatar Jun 14 '24 10:06 Benji377

This issue is also tripping me up with a very simialr context: I fixed it by bumping time to 0.3.36

TheToddmeister avatar Jul 14 '24 16:07 TheToddmeister

I can not bump time to 0.3.36 because

error: failed to select a version for `time`.
    ... required by package `leptonic v0.5.0`
    ... which satisfies dependency `leptonic = "^0.5"` of package `frontend v0.1.0 (/Users/daniel/git/fireside-chat/frontend)`
versions that meet the requirements `=0.3.31` are: 0.3.31

danielclough avatar Jul 30 '24 06:07 danielclough