-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Warn about metadata loader errors #53470
Conversation
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
Hm so in my mind with compiler warnings there should be something actionable to make it go away, but in this case it may not be much that the user can do? I feel like we've added this sort of error handling in the past because it came up in real-world situations, although I don't remember precisely! I think it had something to do with parallel builds though in that rustc was trying to read half-written archives, which I believe should be safely (and silently) ignored, right? |
You can still ignore it using this PR, but this makes it easier to find out what's going on when having a bug in your own |
Could this be gated somehow in that case? I'm worried about this printing warnings for normal Cargo compiles and users can't do anything to squelch the warnings. |
How should I gate it? Add a -Z flag, add a env var, ... |
A -Z flag seems reasonable to me! |
Ping from triage @bjorn3: Some changes have been requested to your PR, do you think you'll be able to work on those? |
Yes, I hope to do it tomorrow, if I dont forget that I opened this pr again. |
Ping from triage, @bjorn3 ! |
9f9f2f9
to
dc6dccd
Compare
I have turned the |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
dc6dccd
to
de49681
Compare
Ready for review |
ping @alexcrichton |
@bors: r+ |
📌 Commit de49681 has been approved by |
@bors rollup |
…crichton Warn about metadata loader errors Output when writing corrupting to libcore.rlib ``` warning: no metadata found: failed to read rlib metadata in '/Users/bjorn/Documents/rust_fork/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps/libcore-857d662d379c5d0c.rlib': File too small to be an archive error[E0463]: can't find crate for `core` error: aborting due to previous error ``` Fixes rust-lang#53381
Rollup of 15 pull requests Successful merges: - #52813 (Duration div mul extras) - #53470 (Warn about metadata loader errors) - #54233 (Remove LLVM 3.9 workaround.) - #54257 (Switch wasm math symbols to their original names) - #54258 (Enable fatal warnings for the wasm32 linker) - #54266 (Update LLVM to fix "bool" arguments on PPC32) - #54290 (Switch linker for aarch64-pc-windows-msvc from LLD to MSVC) - #54292 (Suggest array indexing when tuple indexing on an array) - #54295 (A few cleanups and minor improvements to rustc/traits) - #54298 (miri: correctly compute expected alignment for field) - #54333 (Update The Book to latest) - #54337 (Remove unneeded clone() from tests in librustdoc) - #54346 (rustc: future-proof error reporting for polymorphic constants in types.) - #54362 (Pass --batch to gdb) - #54367 (Add regression test for thread local static mut borrows)
Output when writing corrupting to libcore.rlib
Fixes #53381