-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Issue 90702 fix: Stop treating some crate loading failures as fatal errors #91045
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
Conversation
This comment has been minimized.
This comment has been minimized.
7a96c25
to
8d4c030
Compare
This comment has been minimized.
This comment has been minimized.
Two general comments:
|
daeabcb
to
83d12bb
Compare
I restructered the PR into three commits grouped as thematically as possible incorporating all your suggestions. I hope this makes it easier to disambiguate. EDIT: Wait, I messed up the commits. The first 2 commits were somehow squashed. I'll submit a new one. |
83d12bb
to
f37f925
Compare
@rustbot label -S-waiting-on-author +S-waiting-on-review |
f37f925
to
a598cc9
Compare
I'm aware the last commit currently fails 2 tests. But I'd like you to have a look at it whether these changes are what you had in mind. Also, if you look at the two tests @rustbot label -S-waiting-on-author +S-waiting-on-review |
This comment has been minimized.
This comment has been minimized.
IIRC, imports may attempt to load crates for the second time during import validation (which we now reach due to not producing a fatal error), this looks like the reason for the You can attempt to avoid these extra messages for already erroneous imports (the relevant code should be somewhere inside |
📌 Commit 2c9d9b4 has been approved by |
…nkov Issue 90702 fix: Stop treating some crate loading failures as fatal errors Surface mulitple `extern crate` resolution errors at a time. This is achieved by creating a dummy crate, instead of aborting directly after the resolution error. The `ExternCrateError` has been added to allow propagating the resolution error from `rustc_metadata` crate to the `rustc_resolve` with a minimal public surface. The `import_extern_crate` function is a block that was factored out from `build_reduced_graph_for_item` for better organization. The only added functionality made to it where the added error handling in the `process_extern_crate` call. The remaining bits in this function are the same as before. Resolves rust-lang#90702 r? `@petrochenkov`
…nkov Issue 90702 fix: Stop treating some crate loading failures as fatal errors Surface mulitple `extern crate` resolution errors at a time. This is achieved by creating a dummy crate, instead of aborting directly after the resolution error. The `ExternCrateError` has been added to allow propagating the resolution error from `rustc_metadata` crate to the `rustc_resolve` with a minimal public surface. The `import_extern_crate` function is a block that was factored out from `build_reduced_graph_for_item` for better organization. The only added functionality made to it where the added error handling in the `process_extern_crate` call. The remaining bits in this function are the same as before. Resolves rust-lang#90702 r? ``@petrochenkov``
Mmh, this might cause this test failure here: #91405 (comment) |
Yes, looks like this PR is the reason,
|
@bors r- |
2c9d9b4
to
2ca9333
Compare
I'm trying the same fix then here, ignoring this particular test for @rustbot label -S-waiting-on-author +S-waiting-on-review |
@bors r+ |
📌 Commit 2ca9333 has been approved by |
…askrgr Rollup of 4 iffy pull requests Successful merges: - rust-lang#89234 (Disallow non-c-like but "fieldless" ADTs from being casted to integer if they use arbitrary enum discriminant) - rust-lang#91045 (Issue 90702 fix: Stop treating some crate loading failures as fatal errors) - rust-lang#91394 (Bump stage0 compiler) - rust-lang#91411 (Enable svh tests on msvc) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Surface mulitple
extern crate
resolution errors at a time.This is achieved by creating a dummy crate, instead of aborting directly after the resolution error. The
ExternCrateError
has been added to allow propagating the resolution error fromrustc_metadata
crate to therustc_resolve
with a minimal public surface. Theimport_extern_crate
function is a block that was factored out frombuild_reduced_graph_for_item
for better organization. The only added functionality made to it where the added error handling in theprocess_extern_crate
call. The remaining bits in this function are the same as before.Resolves #90702
r? @petrochenkov