Open mgsloan opened 10 years ago
Side note: my approach to debugging this was to add logging to the IR which generates code: https://gist.github.com/mgsloan/b974946bcb4dc90493c5
Unfortunately, this didn't work out as well as I'd hoped, because FileInfo
isn't serializable. Doing a hack like this solved that:
let (IdeSessionUpdate {ideUpdateFileCmds = [FileWrite info _]}) = updateSourceFile "src/Main.hs" ""
And then replacing all the instances of <<FileInfo src/Main.hs>>
with info
. Oddly enough, this didn't work - all of the calls to getSourceErrors
return empty lists. What's going on?? https://gist.github.com/mgsloan/f47b0d61dd1257b6235b
So, instead, I gave up on the automated approach and translated these logs to using the normal public API, and then reduced the repro from there.
The output is:
I would expect the second
getSourceErrors
results to have anerrorKind
ofKindError
.One interesting thing to note is that
updateRelativeIncludes
is indeed necessary for this repro, and moving it beforeupdateGhcOpts
causes the issue to go away.