-
-
Notifications
You must be signed in to change notification settings - Fork 13k
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
buildRustCrate
cannot handle dependency to two version of the same named crates
#70270
Comments
I prefer using a set in dependencies like this buildRustCrate {
# ...
dependencies = {
a = libc_0_1_12;
b = libc_0_2_62;
};
} Well, this seems to break lots of things. And looks different with the nix-like dependencies If we stick on list type dependencies. Then I think package id is enough to identify a crate well. That is, {
crateRenames = {
"libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "a";
"libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "b";
};
} I'm not sure if we can only use crate name and version here. And to be honest, it still looks weird to me since it should be semantically |
Thank you for your contributions.
|
This bug prevents crate2nix from building rust-analyzer. I would like to see it fixed. |
I marked this as stale due to inactivity. → More info |
The issue still exists. Related: #89563 |
@oxalica I think that this should be fixed in crate2nix |
Describe the bug
#68296 makes
buildRustCrate
support crate renaming. But the implementation use only crate name to identify a crate, which leads to problem if there are two crates with same name but different versions.In this case, we cannot even provide a proper
crateRenames
.From: #68296 (comment)
To Reproduce
Steps to reproduce the behavior:
use {a, b};
tomain.rs
buildRustCrate
with currentcrateRenames
to build it. Eithera
orb
will be not found.Expected behavior
It should be able to build it anyway.
The text was updated successfully, but these errors were encountered: