Skip to content
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

Remove track_errors from check_match, typeck_item_bodies and register_plugins #59199

Merged
merged 5 commits into from
Mar 24, 2019

Conversation

estebank
Copy link
Contributor

In the spirit of continuing through errors in type checking (#39275), remove track_errors from a couple of locations in the codebase.

@rust-highfive
Copy link
Collaborator

r? @davidtwco

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 15, 2019
@estebank
Copy link
Contributor Author

@davidtwco DO NOT APPROVE without agreement from the compiler team.

CC @rust-lang/compiler please poke holes at the code. If you can come up with test cases that would break with this change, please post them here so we can properly handle them. An alternative to landing this as is would be to enable it only in nightly to gather information. I would also like to have a crater run.

@bors try

@estebank estebank added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Mar 15, 2019
@bors

This comment has been minimized.

bors added a commit that referenced this pull request Mar 15, 2019
Remove `track_errors` from `check_match`, `typeck_item_bodies` and `register_plugins`

In the spirit of continuing through errors in type checking (#39275), remove `track_errors` from a couple of locations in the codebase.
@bors
Copy link
Contributor

bors commented Mar 15, 2019

☀️ Try build successful - checks-travis
Build commit: 68fcf88

@estebank

This comment has been minimized.

@craterbot

This comment has been minimized.

@estebank
Copy link
Contributor Author

@craterbot run start=master#bc44841ad2a2ad5f6c5e67b9e35ed8e7e71d4dc7 end=try#68fcf881bd1e4dbfc21e22f8c7a56b8a5d8e8f7b mode=check-only

@craterbot
Copy link
Collaborator

👌 Experiment pr-59199 created and queued.
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 15, 2019
@craterbot
Copy link
Collaborator

🚧 Experiment pr-59199 is now running on agent aws-3-tmp.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Mar 15, 2019
@craterbot
Copy link
Collaborator

🎉 Experiment pr-59199 is completed!
📊 0 regressed and 0 fixed (50551 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the blacklist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Mar 16, 2019
@estebank
Copy link
Contributor Author

I didn't see any regressions... Would @rust-lang/compiler feel comfortable landing this and letting it ride the release train to catch any potential ICEs?

if let Err(ErrorReported) = tcx.check_match(def_id) {
return Err(ErrorHandled::Reported)
}
tcx.check_match(def_id);
Copy link
Member

@eddyb eddyb Mar 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling this feels pointless, also similar for mir_const_qualif below.
cc @oli-obk Can we just remove these and rely only on tainted_by_errors instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I seem to remember that building MIR before match checking results in ICEs. Not sure this belongs here though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That shouldn't make sense nowadays, though, there should be no mutable state involved?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in check_match reports errors for match expressions while MIR building ICEs on those same expressions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sure, but that means MIR building should be handling this gracefully.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you ok with this being addressed in a separate PR? If so, I'll open an issue

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be handled here, as the behavior of "exit if check_match errored" is gone! You could try to turn an error into an ICE if you want.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I guess I'd be fine with a // FIXME(#...) check_match may have errored but we're not checking for that anymore here.

let body_id = if let Some(id) = tcx.hir().as_local_hir_id(def_id) {
tcx.hir().body_owned_by(id)
} else {
return Ok(());
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @nikomatsakis Is this intentional? I remember some of the queries I wrote would panic if they got a non-local DefId.

@eddyb
Copy link
Member

eddyb commented Mar 18, 2019

r=me with nits fixed, I guess?

@davidtwco
Copy link
Member

r? @eddyb

@rust-highfive rust-highfive assigned eddyb and unassigned davidtwco Mar 18, 2019
@estebank
Copy link
Contributor Author

For what is worth, greping through the crater results I couldn't find any ICEs, but of course these are more likely to crop up when actually writing code. I see four course of actions:

  1. do nothing, kill this PR and revisit in the future
  2. merge this PR now and deal with problems as they come up
  3. delay merging this PR until the next beta gets cut, so that we have a full release cycle to catch problems that might come up
  4. merge this PR modified to gate the new behavior on being a nightly compiler to have multiple cycles of testing in nightly before promoting and letting it ride the train

@eddyb
Copy link
Member

eddyb commented Mar 21, 2019

@estebank Worst case, you've turned an error into an ICE. Code that compiled is almost impossible to be affected.

I'd say we should merge this, so r=me after #59199 (comment) is addressed (just the comment + issue should be enough, seems low-priority).

@estebank
Copy link
Contributor Author

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Mar 23, 2019

📌 Commit ffc97cf3b3621e8f47a2512b822cdcf05950f0bd has been approved by eddyb

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 23, 2019
@estebank
Copy link
Contributor Author

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Mar 23, 2019

📌 Commit 5723632 has been approved by eddyb

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Mar 23, 2019
Remove `track_errors` from `check_match`, `typeck_item_bodies` and `register_plugins`

In the spirit of continuing through errors in type checking (rust-lang#39275), remove `track_errors` from a couple of locations in the codebase.
@bors
Copy link
Contributor

bors commented Mar 24, 2019

⌛ Testing commit 5723632 with merge fb5ed48...

bors added a commit that referenced this pull request Mar 24, 2019
Remove `track_errors` from `check_match`, `typeck_item_bodies` and `register_plugins`

In the spirit of continuing through errors in type checking (#39275), remove `track_errors` from a couple of locations in the codebase.
@bors
Copy link
Contributor

bors commented Mar 24, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: eddyb
Pushing fb5ed48 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 24, 2019
@bors bors merged commit 5723632 into rust-lang:master Mar 24, 2019
@estebank estebank deleted the untrack-errors branch November 9, 2023 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants