-
Notifications
You must be signed in to change notification settings - Fork 845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stack doesn't rebuild enough when using Custom build-type #2040
Comments
One possible solution here could be to treat |
Yeah, special casing |
Problem is, if package D has What about another solution: take into account the |
Yeah, though it seems to me like a strange behavior to toggle based on |
commercialhaskell#2040). This is necessary for packages that use a custom Setup.hs (`build-type: Custom`). Previously, stack wouldn't rebuild the package if the only changes were to the `extra-source-files`. Stack was already marking the package as dirty if `data-files` changed; this just hooks `extra-source-files` into the same mechanism.
commercialhaskell#2040). This is necessary for packages that use a custom Setup.hs (`build-type: Custom`). Previously, stack wouldn't rebuild the package if the only changes were to the `extra-source-files`. Stack was already marking the package as dirty if `data-files` changed; this just hooks `extra-source-files` into the same mechanism.
I think this is resolved by the merge of #2362. Please re-open if not. |
Steps to reproduce
Create a trivial stack project with the following Setup.hs (and setting
build-type: Custom
):Then
stack build
twice.Expected
stack should run the preBuild/postBuild hooks each time
stack build
is called. In general these may be callouts tomake
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.
The text was updated successfully, but these errors were encountered: