-
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
Crate paths specified with --extern cause bogus duplicate crates when using symlinks #16496
Comments
dotdash
added a commit
to dotdash/rust
that referenced
this issue
Aug 15, 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. 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 issue
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
SimonSapin
added a commit
to SimonSapin/servo
that referenced
this issue
Sep 22, 2014
Currently, `mach build-cef` uses a completely separate target directory than `mach build`, so everything gets built twice. Now that we’ve upgraded Rust to a version that fixes rust-lang/rust#16496, we can make this symlink to share target directories. "git" dependencies builds are shared as expected, but "path" dependecies still get rebuilt for some reason that might be related to rust-lang/cargo#497 @alexcrichton says this is unsupported behavior and we shouldn’t do it, but it still is strictly better than what we have now as far as I can tell.
SimonSapin
added a commit
to SimonSapin/servo
that referenced
this issue
Sep 22, 2014
Currently, `mach build-cef` uses a completely separate target directory than `mach build`, so everything gets built twice. Now that we’ve upgraded Rust to a version that fixes rust-lang/rust#16496, we can make this symlink to share target directories. "git" dependencies builds are shared as expected, but "path" dependecies still get rebuilt for some reason that might be related to rust-lang/cargo#497 @alexcrichton says this is unsupported behavior and we shouldn’t do it, but it still is strictly better than what we have now as far as I can tell.
matthiaskrgr
pushed a commit
to matthiaskrgr/rust
that referenced
this issue
Feb 11, 2024
minor: remove clones
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Build servo in a path that has a symlink in it currently fails, because the
url
crate is used inhttp
as well as servo'snet
. Both are build with the crate forurl
specified using --extern, but the assigned paths end up differently:One path has the symlink (the
build
dir in this case) resolved, the other doesn't. Looks like there's a call torealpath()
missing fromexisting_match()
.Unless somebody beats me to it, I'll create a PR later today or tomorrow.
The text was updated successfully, but these errors were encountered: