-
Notifications
You must be signed in to change notification settings - Fork 563
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
Prevent hangs on internal errors #4126
Prevent hangs on internal errors #4126
Conversation
6c0e5f0
to
69ac52c
Compare
69ac52c
to
6e56f51
Compare
I think |
The code looks reasonable but I'm a little bit hesitant to approve, just because of where this change is. Does this change only appear to affect the unit tests, or does it affect running the compiler normally as well? |
The error will get tagged with the source position of the thing it was checking when the internal error occured. This is incredibly useful. |
Ok, that is very convincing. So maybe the approach should be “use |
It does affect the compiler running normally, but in a less dramatic way. Based on my tests, prior to this patch, an internal error usually causes the compiler to print only the error itself and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok then, that also sounds like an improvement.
Description of the change
Sometimes, when one of our unit tests results in an internal error, the entire test process hangs. This is mildly annoying, and I think this PR is the appropriate fix? I have to confess that I don't have as solid an understanding of how
MonadBaseControl
works as I'd like. Also, our whole internal error story is kind of confusing to me—we haveinternalError
, but alsointernalCompilerError
, and a few instances oferror
scattered about to boot. I don't know if further enabling using the exception-based error functions instead of encouraging more use of the monadicinternalCompilerError
is the right thing to do.Buuuuuut... this fix is quick and not too disruptive to the status quo, so I'm proposing it!
Checklist: