-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
"error[E0519]: the current crate is indistinguishable from one of its dependencies" does not always accurately describe the problem #111691
Comments
If I understand the issue correctly, the chromium build system is calling rustc with something like However, like with #111284, the error message reported by the compiler was a bit indirect. It would be nice if it suggested e.g. to check for the crates built with the same |
Bad error message selectoin was fixed in #111461 |
I'm also seeing this issue when I attempt to compile |
I'm seeing this issue when compiling my crate for coverage analysis using cargo-tarpaulin. |
We were seeing
error[E0519]: the current crate is indistinguishable from one of its dependencies
in our build and couldn't really make sense of it because it was complaining about things likelog
crate insidehtml5ever
. It turns out that chromium added https://source.chromium.org/chromium/chromium/src/+/main:build/rust/cargo_crate.gni;l=102?q=rustc_metadata&ss=chromiumwhich defaults to using the epoch in
-Cmetadata=${_rustc_metadata}
If you happen to have two different crates with the same symbol and same epoch (but different crate names), you'll get this error, but the description of the problem is confusing because it actually has nothing to do with crate names in this case
it has the same crate-name log and was compiled with the same -C metadata arguments
The crate name appears to be irrelevant if you supply the same metadata arguments because we fixed it with this
The text was updated successfully, but these errors were encountered: