-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
workspaces: overzealous native library dependency conflicting #7880
Comments
I've also run into this issue in knurling-rs/defmt#426, where I tried to support multiple incompatible versions of a library by means of Cargo features. It seems that it is impossible to do so because of this bug, which makes upgrading that library very painful (the whole ecosystem needs to do so in a coordinated fashion, and it requires a breaking change in every single downstream library). |
I think the defmt issue is similar, but ultimately quite different. This issue is entirely about two different, independent, workspace members each having a different A single crate depending (optionally) on two |
We are facing a similar issue on SeaQL/sea-query#388 where we have two different packages depending on two versions on sqlite and it fails to build. This is very annoying because like it is mentioned above the whole ecosystem needs to keep in sync for us to be able to upgrade even though the dependencies have nothing in common. |
removed workspace to avoid cargo bug: rust-lang/cargo#7880
Problem
I have a workspace with multiple crates, but for brevity purposes, consider this workspace:
These two output a binary executable and don’t depend on each other at all. They have the following dependencies:
And both versions of
ring
, in turn, specifylinks="ring-asm"
.Trying to
cargo update
this workspace will then fail with the following error:There's no actual conflict here, however, and not using a workspace would make it work just fine. Whether that’s a good-enough of a workaround is dubious, though.
Steps
cargo update
Possible Solution(s)
Do not conflict when a particular workspace crate links to just one
links
dependency. Care must be taken, however, to ensure that we still do conflict when we’d end up pulling multiplelinks
crates into the same binary.Notes
Output of
cargo version
: not relevantThe text was updated successfully, but these errors were encountered: