Skip to content

Commit

Permalink
Let extra-source-files mark a package as dirty (commercialhaskell#1891,
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Judah Jacobson committed Jul 10, 2016
1 parent 8d9fd0c commit 6512c4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ChangeLog.md
Expand Up @@ -24,6 +24,8 @@ Bug fixes:

* Now ignore project config when doing `stack init` or `stack new`. See
[#2110](https://github.com/commercialhaskell/stack/issues/2110).
* Now consider a package to be dirty when an extra-source-file is changed.
See [#2040](https://github.com/commercialhaskell/stack/issues/2040).

## 1.1.0

Expand Down
4 changes: 3 additions & 1 deletion src/Stack/Package.hs
Expand Up @@ -522,7 +522,9 @@ packageDescModulesAndFiles pkg = do
(mapM
(asModuleAndFileMap benchComponent benchmarkFiles)
(benchmarks pkg))
(dfiles) <- resolveGlobFiles (map (dataDir pkg FilePath.</>) (dataFiles pkg))
(dfiles) <- resolveGlobFiles
(extraSrcFiles pkg
++ map (dataDir pkg FilePath.</>) (dataFiles pkg))
let modules = libraryMods <> executableMods <> testMods <> benchModules
files =
libDotCabalFiles <> exeDotCabalFiles <> testDotCabalFiles <>
Expand Down

0 comments on commit 6512c4a

Please sign in to comment.