ghcid icon indicating copy to clipboard operation
ghcid copied to clipboard

Custom setup

Open stefjoosten opened this issue 5 years ago • 4 comments

In the file package.yaml I can configure a custom setup. As a result, the compiler runs setup.hs. I reckon ghcid should do the same to ensure that changes in setup.hs are also seen by ghcid.

stefjoosten avatar Feb 11 '20 20:02 stefjoosten

Are you suggesting that changes to Setup.hs cause ghcid to restart, much like changes to foo.cabal do? The code is at https://github.com/ndmitchell/ghcid/blob/master/src/Ghcid.hs#L134-L162, and I'd welcome a patch (it's the things that end up in restart. I also note that package.yaml does not trigger a restart - that sounds like a bug?

ndmitchell avatar Feb 11 '20 21:02 ndmitchell

No, the problem is that stack install behaves differently than ghcid. Stack install runs the program setup.hs if package.yaml specifies a custom setup. And ghcid doesn't.

stefjoosten avatar Feb 11 '20 21:02 stefjoosten

What is the command that ghcid is running? It should say on the first few lines of the output.

ndmitchell avatar Feb 11 '20 21:02 ndmitchell

Having similar issue, seems like ghcid command runs old version of Setup.hs after the changes in setup file, even in case where --restart=Setup.hs is specified.

tim2CF avatar Dec 01 '22 19:12 tim2CF