Closed TomMD closed 4 years ago
Stan supports Cabal v2 builds, this is even checked on CI. All our tools are built and tested on CI with Cabal v2 builds. So I'm confident that Stan has nothing to do with your issue.
Stan doesn't depend on any specific build tool for its work. Generating the HIE files is not Stan's responsibility. You can create the HIE files the way you want. All that Stan need is the directory with the HIE files, which you can organise as you wish.
I would suggest you to open a Cabal issue to discuss the problems with generating the HIE files when using Cabal v2 build on your specific case (you will need to provide more details on what project you build and how).
I am afraid there is nothing we can do here, as Stan is explicitly not generating the HIE files itself and works with what is given to it :slightly_smiling_face:
For any future reader - the issue and solution:
I see my original message didn't faithfully demonstrate the issue. The issue, not stan but related to stan usage, is with cabal.project style systems. Using the relative --hiedir=.hie
results in the files being spread around a bit. The solution is absolute paths:
cabal build --ghc-options "-fwrite-ide-info -hiedir=$(pwd)/.hie" all
That is, ensuring no matter where ghc
is being called from we are placing the hie files in the local directory.
Cabal v2 builds lack support. I get this might be more of a cabal issue than Stan issue, feel free to redirect.
I optimistically tried:
but that actually only got the
ChangeLog.hs
and all the sub-components were built but the.hie
files were not in the.hie
directory. Stan might be able to leverage hie-bios, but I'm guessing this will be considered a cabal issue - I'm just looking for any thoughts or pointers to prior work.