jaspervdj / hakyll

A static website compiler library in Haskell
jaspervdj.be/hakyll
Other
2.7k stars 409 forks source link

Catch exceptions when writing compiler results #1015

Closed jaspervdj closed 10 months ago

jaspervdj commented 10 months ago

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.