-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
query cycles could be handled more like ICEs #119321
Comments
We could also consider making query cycles an ice with |
I dont think you need to file a bunch of issues for fuzzed query cycles. They could be improved, but they're not ICEs--at the end of the day, they're regular (yes, verbose) errors. Unless you're also going to write up a detailed explanation about how and if they can be fixed at all, I think it's far more noise than what is worth it. |
While query cycles are very bad diagnostics, I think it's fine and kinda unavoidable if some very weird code (fuzzed code) has cycles. If a user hits a query cycle, that should be fixed, but for fuzzed code it doesn't really matter imo. |
I definitely agree with this. On the other hand, I gave this issue a 👍 because query cycles arising from innocent looking code that uses experimental features are often indicative of a bug in the implementation, let me just mention
F-generic_const_exprs
|
When just checking the files inside the rustc repo (file in our testsuite), we already have 14 different kinds of query cycles showing up, so no fuzzing required ;) |
from https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/recent-ish.20nightly.20regression.20wrt.20Freeze
Sometimes the compiler blurps out something like
error[E0391]: cycle detected when XYZ
yay: the compiler saved itself from going in circles infinitely because it noticed it was trying to compute something self-referential
nay: we SHOULD have had a proper diagnostic earlier in which the compiler errors out and explains the user why the self-referential thing they are trying to do is not going to work out instead of just throwing a "oops, query cycle" in their face.
If we encounter such a query cycle, we should tell users to report it a diagnostic bug.
Maybe we can also improve the spans of the
E0391
a bit.The text was updated successfully, but these errors were encountered: