-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Source replacements are ignored when producing compilation units #14821
Comments
Ran |
So, in my example repo, you need to run those steps from subdirectory
|
You need to start the fake registry in either of those, otherwise Cargo cannot connect to them. Anyway I can reproduce it now. This reminds me #10310 though they don't seem to be the same, and also one of the two |
It is indeed. This isn't an artificial case though, it was triggered by migrating a registry from one domain to another: some versions of some crates are mirrored on both, leading to this situation. Fortunately, the fix for #14729 doesn't have any unintended effects: the only thing it does is replace more sources in The fix for this issue is a little different, since it changes the rustc invocations when sources are replaced:
|
Problem
When replacing sources in
.cargo/config.toml
so that two different sources point to the same vendored directory, cargo identifies a single package from two different sources as different, giving rise to a confusing error message where a type from a file is claimed to be distinct from itself:Steps
cargo vendor ../vendor
from subdirectorya
, which yields a wrong output (as per Cargo vendor doesn't replace all sources used by dependencies in its output #14729).a/.cargo/config.toml
, should be:cargo build
from subdirectorya
.The text was updated successfully, but these errors were encountered: