Open
Description
Report against Stack-3.3.1 (latest).
I noticed that Stack
does not seem to honor the extra-source-files
when deciding whether to rebuild a project, in contrast to Cabal
which does so.
This is relevant when using file-embed
to embed files into the executable. Changes to the embedded files should trigger a recompilation to keep the executable up-to-date.
E.g. I want that these files are always embedded in their latest version:
extra-source-files:
data/README.md
data/sub/Foo.md
I added the second one in a second step. I see the following behavioral difference between Stack
and Cabal
:
$ stack run ✔ │ ghc-9.4.8 hs │ 10:06:41
File: README.md
Content: "This is a test of the `file-embed` package,\napplied to the `data-dir` of a Haskell project.\n"
$ cabal run ✔ │ ghc-9.4.8 hs │ 10:14:10
File: README.md
Content: "This is a test of the `file-embed` package,\napplied to the `data-dir` of a Haskell project.\n"
File: sub/Foo.md
Content: "This is a file in a subdirectory.\nIt contains 2 lines.\n"
WANT: Changes to the amount and content of the extra-source-files
should trigger a rebuild.
I attach a reproducer to play with.