ndmitchell / ghcid

Very low feature GHCi based IDE
Other
1.13k stars 114 forks source link

Custom setup #299

Open stefjoosten opened 4 years ago

stefjoosten commented 4 years ago

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.

ndmitchell commented 4 years ago

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?

stefjoosten commented 4 years ago

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.

ndmitchell commented 4 years ago

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

tim2CF commented 1 year ago

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.