commercialhaskell / stack

The Haskell Tool Stack
http://haskellstack.org
BSD 3-Clause "New" or "Revised" License
4k stars 844 forks source link

ghci should put .hie files in .stack-work #5419

Open brandon-leapyear opened 4 years ago

brandon-leapyear commented 4 years ago

Our stack.yaml file has

ghc-options:
  "$locals": -fwrite-ide-info

and when running stack build, the .hie files are correctly written to .stack-work. But running stack ghci puts the .hie files next to the source files.

Is it possible for stack ghci to put .hie files in .stack-work as well?

brandon-leapyear commented 3 years ago

:sparkles: This is an old work account. Please reference @brandonchinn178 for all future communication :sparkles:


Alternatively, maybe add ghc-options to the build configuration so we could specify -fwrite-ide-info when building but not otherwise?

mpilgrem commented 6 months ago

@brandonchinn178, I am working through open issues, including old ones. On your second limb above, had you considered the following:

configure-options:
  $locals:
  - --ghc-option=-fwrite-ide-info
brandonchinn178 commented 6 months ago

I don't have the context I had when I wrote this issue, but it seems like it works in a fresh project!