You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to make stack ghci reliable / consistent, the cabal_macros.h and Paths_* files need to be generated. Currently, this means that we do a full build of the targets (unless --no-build is passed).
Really all that needs to happen is to run initialBuildSteps before running ghci. Running this function requires LocalBuildInfo, which gets stored in dist/setup-config. Unfortunately, we can't call it directly from stack - it uses Binary / Generic, so we can't rely on it being compatible between cabal versions (and stack may be linked with a different version).
I think a reasonable solution to this is to have a separate program which runs initialBuildSteps on the specified packages. This separate program could either be a script that gets runhaskell-ed, or something that gets build and installed to the snapshot (like the default Setup.hs).
This solution also has relevance to other issues:
It's also the information necessary to allow Setup.hs to modify the cabal info (see "stack ghci" doesn't honor configured cpp flags #970). Doing this would be more complicated. I think the best way to do this would be to serialize localPkgDescr as a .cabal file (I really hope this is possible). Then, we'd would parse the resulting cabal file, and use that description to generate the arguments passed to ghci.
In order to make
stack ghcireliable / consistent, thecabal_macros.handPaths_*files need to be generated. Currently, this means that we do a full build of the targets (unless--no-buildis passed).Really all that needs to happen is to run
initialBuildStepsbefore running ghci. Running this function requiresLocalBuildInfo, which gets stored indist/setup-config. Unfortunately, we can't call it directly from stack - it uses Binary / Generic, so we can't rely on it being compatible between cabal versions (and stack may be linked with a different version).I think a reasonable solution to this is to have a separate program which runs
initialBuildStepson the specified packages. This separate program could either be a script that getsrunhaskell-ed, or something that gets build and installed to the snapshot (like the default Setup.hs).This solution also has relevance to other issues:
localPkgDescras a .cabal file (I really hope this is possible). Then, we'd would parse the resulting cabal file, and use that description to generate the arguments passed to ghci.