-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
"aborting due to N previous errors" only counts errors in the last pass #33525
Comments
Nominating just to signal boost really since this is really annoying. I think it should be easy to fix, but I'm not quite confident enough about that to slap an e-easy on this. |
@Mark-Simulacrum were you interested in working on this? |
Sure! I'd be willing to try getting this done. Can you give me a hint where I should look at? |
So, this is pretty much a "hunt the bug" issue. I'm not exactly sure where it is going wrong, but once you find it is should be easy to fix. Start by looking at |
Okay, updating this issue with what I've found and putting it up for grabs, since I think this is more I-papercut and as such P-low, but I'll leave that designation up to the compiler team. Currently, name resolution, for example, does not track the errors that it reports, and we then continue despite it's failure, forgetting to update the number of errors. After talking with @nrc on IRC, it's been suggested that a semi-temporary fix for this could be to change the "error: aborting due to 3 previous errors" text to "error: aborting due to a few previous errors" for 2-4 errors, "error: aborting due to many previous errors" for 5+ errors, etc. I personally feel like the error count isn't altogether that useful as it is, except potentially as a way of assessing the time required to remove an obsolete function or other wide-sweeping change--though I feel like rustc potentially not reporting all errors sort of makes even that not really possible; so perhaps the "right" fix is to remove the error reporting from the output, though that's technically backwards incompatible, I guess. |
I think the only value this message has is giving a concrete number, but it would be worth while to question how valuable that actually is. If we can't get the number right, then the message is not useful - it's obvious from the spew there were multiple errors of some quantity. I'd be happy removing it completely. We have a lot of error spew, and this is any easy bit to scale back. |
I agree. I think that we can just change it to say "aborting due to previous errors" without giving a number, since that's arguably enough information. I don't really know of any cases where it'd be super helpful to know the quantity of errors a change introduced (and Just some quick steps if anyone wants to implement this (I can mentor). The following two places in the code need to be changed to print the "aborting due to previous error(s)" statement.
|
@Mark-Simulacrum I'll pick this one up. |
See rust-lang#33525 for details.
…ages, r=Mark-Simulacrum Change error count messages See rust-lang#33525 for details. r? @Mark-Simulacrum
…ages, r=Mark-Simulacrum Change error count messages See rust-lang#33525 for details. r? @Mark-Simulacrum
…ages, r=Mark-Simulacrum Change error count messages See rust-lang#33525 for details. r? @Mark-Simulacrum
…ages, r=Mark-Simulacrum Change error count messages See rust-lang#33525 for details. r? @Mark-Simulacrum
…ages, r=Mark-Simulacrum Change error count messages See rust-lang#33525 for details. r? @Mark-Simulacrum
rustc now (rust-lang/rust#33525) does not report an error count anymore, because it was not correct in many cases.
rustc now (rust-lang/rust#33525) does not report an error count anymore, because it was not correct in many cases.
rustc now (rust-lang/rust#33525) does not report an error count anymore, because it was not correct in many cases.
This was fixed in #42150. |
Meta
STR
Expected Results
3 errors are reported, followed by "error: aborting due to 3 previous errors".
Actual Result
3 errors are reported, but the errors reported count only counts the 2 errors from the type-checking pass - so "error: aborting due to 2 previous errors" is printed.
The text was updated successfully, but these errors were encountered: