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

Catch exceptions when writing compiler results #1015

Merged
merged 1 commit into from Jan 8, 2024

Conversation

jaspervdj
Copy link
Owner

Various things may go wrong when a user-provided Compiler is producing an Item. Typically these end up as a CompilerError which gets logged and we stop execution.

However, due to laziness, it's possible to have a compiler succeed, but return an Item that will throw an exception when it's written. This will break the waiting mechanism in the scheduler, causing a thread blocked indefinitely in an MVar operation error like in #1014. I added a test case reproducing this.

Various things may go wrong when a user-provided `Compiler` is producing an
`Item`.  Typically these end up as a `CompilerError` which gets logged and
we stop execution.

However, due to laziness, it's possible to have a compiler succeed, but return
an `Item` that will throw an exception when it's written.  This will break the
waiting mechanism in the scheduler, causing a `thread blocked indefinitely in an
MVar operation` error like in #1014.  I added a test case reproducing this.
@jaspervdj jaspervdj merged commit 3f762f2 into master Jan 8, 2024
21 checks passed
@jaspervdj jaspervdj deleted the scheduler-catch-compiler-write branch January 8, 2024 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant