-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
ICE when using rename-dependency with a crate that is also a transitive dependency #51796
Comments
Removing it as it also triggers rust-lang/rust#51796.
I also encountered this bug while trying to use this feature. This is possibly a blocker on the 2018 edition; if rename-dependency can't be stabilized the new module system will have a UX regression. |
Did some investigation: This happens if & and only if you rename a dependency that you have a transitive dependency on as well. It does not matter if your dependency that is also dependent on the renamed crate renames it itself or not, only that this crate you've renamed is also a transitive dependency. I've renamed the issue accordingly. |
cc @rust-lang/cargo |
Whenever we register a crate into the crate store, make sure to use the real name mentioned in the metadata instead of the name mentioned in the `extern crate` statement, as the statement can be wrong! Closes rust-lang#51796
I believe this is fixed in #52723 |
… r=estebank rustc: Register crates under their real names Whenever we register a crate into the crate store, make sure to use the real name mentioned in the metadata instead of the name mentioned in the `extern crate` statement, as the statement can be wrong! Closes rust-lang#51796
Testing with a recent nightly (60efbde 2018-06-23), importing a crate
a
by a rename-dependency alias (rust-lang/cargo#5422) before importing a crateb
that also depends ona
causes an compiler panic.I've put together a minimal workspace demonstrating the crash. Here are the highlights:
c/Cargo.toml:
c/src/lib.rs:
backtrace when compiling
c
:Note that if I
extern crate
the dependent crate before renamed crate, every is dandy.This is likely the same bug as #51259, but I have found a minimal test case.
The text was updated successfully, but these errors were encountered: