Closed
Description
Steps to reproduce
Create a trivial stack project with the following Setup.hs (and setting build-type: Custom
):
import Distribution.Simple
main = defaultMainWithHooks simpleUserHooks { postBuild = putStrLn "Hey!" }
Then stack build
twice.
Expected
stack should run the preBuild/postBuild hooks each time stack build
is called. In general these may be callouts to make
or any other foreign build system, whose dependency graph is invisible to Cabal/Stack/GHC.
Actual
stack runs these hooks once only, unless Haskell source files change. Note that cabal-install does rerun these hooks every time. It's Stack's recompilation avoidance that seems to be the problem here.