You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a dependency I want 2 versions of a crate, but the crate uses the links attribute as only one is allowed.
If I rename the 2 versions of a crate and use the package and set optional = true the links check still fails, even though none of the optional dependencies are enabled.
The root of your problem is that a lockfile is generated with all features enabled. Features are supposed to be additive.
In this case, if you have a different project in a different workspace that depends on your example it will work.
Problem
As a dependency I want 2 versions of a crate, but the crate uses the
links
attribute as only one is allowed.If I rename the 2 versions of a crate and use the
package
and setoptional = true
thelinks
check still fails, even though none of the optional dependencies are enabled.I'd expect this to work with only one of the 2 enabled, but fail with a
links
error if both were enabled.And it seems from here that this should be allowed: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml
With the line
Depend on multiple versions of a crate.
Steps
Use the following
Cargo.toml
in an empty project and runcargo build
to show the issue:Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: