-
-
Notifications
You must be signed in to change notification settings - Fork 407
Description
We've had ghcide crashing, and the editor trying to reload it leads to a tight loop that the editor can't escape. Trying the ghcide binary from the command-line in test mode leads to a segfault:
Step 6/6: Type checking the files
Segmentation fault (core dumped)
This is triggered when using TemplateHaskell. We have a splice fromPackage :: Q Exp which returns some metadata from the project's .cabal file:
version :: Version
version = $(fromPackage)removing this definition from the source file (in this case RenderMain.hs lines 13-14) allows the ghcide binary to complete its test run:
Step 6/6: Type checking the files
Completed (1 file worked, 0 files failed)
I had earlier speculated that QuasiQuotes were to blame, but the file checks ok with those [quote| ... |] blocks still in the file.
Other files in the project load and check fine, so long as you avoid having the problematic file open in an editor tab you can avoid the crash. Not ideal, but at least a workaround.