-
Notifications
You must be signed in to change notification settings - Fork 13.3k
"rustc_metadata::locator no metadata found: no .rustc
section" warnings during compilation
#90525
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
Comments
.rustc
section" warnings during compiling.rustc
section" warnings during com,pilation
.rustc
section" warnings during com,pilation.rustc
section" warnings during compilation
Here is a reduced reproduction: echo 'pub fn foo() {}' > foo_a_b.rs
echo 'pub use foo_a_b::foo;' > foo_a.rs
echo 'pub use foo_a::foo;' > foo.rs
echo 'fn main() { foo::foo(); }' > main.rs
rustc foo_a_b.rs --edition=2018 --crate-type=cdylib,rlib
rustc foo_a.rs --edition=2018 --crate-type=rlib --extern foo_a_b=./libfoo_a_b.rlib
rustc foo.rs --edition=2018 --crate-type=rlib --extern foo_a=./libfoo_a.rlib -L .
rustc main.rs --edition=2018 --extern foo=./libfoo.rlib -L . When the crate loader needs to load There is more discussion of this at #89795 (comment). I did a workaround for that particular issue, but I think I agree that the |
…henkov Demote metadata load warning to "info". There is a warn log message for whenever the crate loader fails to load metadata from a candidate file. I think this warning is too aggressive, as there are several situations where metadata information might not be found in a candidate file, which is normal. Also, this warning is somewhat confusing, and non-actionable in most cases for a user (most users will not know what it means). If the crate loader ultimately does not find a valid crate, then an error will be reported (and hopefully rust-lang#88368 will improve that error message). If a rustc developer wants to debug a loader problem, they can still use `RUSTC_LOG=rustc_metadata=debug` and get the details. There is more discussion of this particular warning at rust-lang#89795 (comment). Fixes rust-lang#90525
…henkov Demote metadata load warning to "info". There is a warn log message for whenever the crate loader fails to load metadata from a candidate file. I think this warning is too aggressive, as there are several situations where metadata information might not be found in a candidate file, which is normal. Also, this warning is somewhat confusing, and non-actionable in most cases for a user (most users will not know what it means). If the crate loader ultimately does not find a valid crate, then an error will be reported (and hopefully rust-lang#88368 will improve that error message). If a rustc developer wants to debug a loader problem, they can still use `RUSTC_LOG=rustc_metadata=debug` and get the details. There is more discussion of this particular warning at rust-lang#89795 (comment). Fixes rust-lang#90525
When compiling our project, many warnings regarding "no .rustc section" are printed.
To reproduce, please check out https://github.com/farmaazon/bug-repro , go to
src/rust
directory and runcargo build
.You should see some warning similar to
As far as I checked, the warnings are not displayed when building crates separately.
Meta
rustc --version --verbose
:The repository contains rust-toolchain file.
The text was updated successfully, but these errors were encountered: