Skip to content

Stack doesn't rebuild enough when using Custom build-type #2040

Closed
@mboes

Description

@mboes

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions