Skip to content
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

Properly canonicalize crate paths specified via --extern #16505

Merged
merged 1 commit into from
Aug 16, 2014

Conversation

dotdash
Copy link
Contributor

@dotdash dotdash commented Aug 14, 2014

Crates that are resolved normally have their path canonicalized and all
symlinks resolved. This does currently not happen for paths specified
using the --extern option to rustc, which can lead to rustc thinking
that it encountered two different versions of a crate, when it's
actually the same version found through different paths.

Fixes #16496

@alexcrichton
Copy link
Member

Can you add a test for this as well? Something like the libs-through-symlinks or symlinked-libraries run-make tests.

Crates that are resolved normally have their path canonicalized and all
symlinks resolved. This does currently not happen for paths specified
using the --extern option to rustc, which can lead to rustc thinking
that it encountered two different versions of a crate, when it's
actually the same version found through different paths.

To fix this, we must store the canonical path for crates found via
--extern and also use the canonical path when comparing paths.

Fixes rust-lang#16496
bors added a commit that referenced this pull request Aug 16, 2014
Crates that are resolved normally have their path canonicalized and all
symlinks resolved. This does currently not happen for paths specified
using the --extern option to rustc, which can lead to rustc thinking
that it encountered two different versions of a crate, when it's
actually the same version found through different paths.

Fixes #16496
@bors bors closed this Aug 16, 2014
@bors bors merged commit a5590b3 into rust-lang:master Aug 16, 2014
@dotdash dotdash deleted the extern_realpath branch February 4, 2015 12:41
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this pull request Feb 11, 2024
Optimize input queries that take no arguments

There is no point in having a hashmap and extra lock for this, it is always only a single value. This might speed up some things by a tiny bit for our crate graph query.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crate paths specified with --extern cause bogus duplicate crates when using symlinks
3 participants