You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cabal package references the two extra files as extra-source-files, and then uses them in Main.hs via file-embed.
Expected:
Modifiying either extra1 or stack-extra/extra2 should trigger a rebuild of the package.
Actual:
╭─mtolly@metal ~/g/stack-extra <master>
╰─$ stack --version
Version 1.0.5, Git revision 32406d106f46625e03b8495317abc21abc3a1674 x86_64
╭─mtolly@metal ~/g/stack-extra <master>
╰─$ stack build
stack-extra-0.1.0.0: configure
Configuring stack-extra-0.1.0.0...
Warning: 'extra-src-files: ../extra1' is a relative path outside of the source
tree. This will not work when generating a tarball with 'sdist'.
stack-extra-0.1.0.0: build
Preprocessing executable 'stack-extra' for stack-extra-0.1.0.0...
[1 of 1] Compiling Main ( src/Main.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/stack-extra/stack-extra-tmp/Main.o )
Linking .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/stack-extra/stack-extra ...
stack-extra-0.1.0.0: copy/register
Installing executable(s) in
/Users/mtolly/git/stack-extra/.stack-work/install/x86_64-osx/lts-5.10/7.10.3/bin
╭─mtolly@metal ~/g/stack-extra <master>
╰─$ echo changed > extra1
╭─mtolly@metal ~/g/stack-extra <master*>
╰─$ stack build
╭─mtolly@metal ~/g/stack-extra <master*>
╰─$ echo changed > stack-extra/extra2
╭─mtolly@metal ~/g/stack-extra <master*>
╰─$ stack build
stack-extra-0.1.0.0: build
Preprocessing executable 'stack-extra' for stack-extra-0.1.0.0...
[1 of 1] Compiling Main ( src/Main.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/stack-extra/stack-extra-tmp/Main.o ) [extra2 changed]
Linking .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/stack-extra/stack-extra ...
stack-extra-0.1.0.0: copy/register
Installing executable(s) in
/Users/mtolly/git/stack-extra/.stack-work/install/x86_64-osx/lts-5.10/7.10.3/bin
Here is the verbose output from the 2nd stack build command (the one that doesn't rebuild).
What I assume is the same issue:
╭─mtolly@metal ~/g/stack-extra <master*>
╰─$ stack build --file-watch
ExitSuccess
Type help for available commands. Press enter to force a rebuild.
watched
/Users/mtolly/git/stack-extra/stack-extra/extra2
/Users/mtolly/git/stack-extra/stack-extra/src/Main.hs
/Users/mtolly/git/stack-extra/stack-extra/stack-extra.cabal
/Users/mtolly/git/stack-extra/stack.yaml
The text was updated successfully, but these errors were encountered:
Looked into this a bit. The problem is the use of parseRelFile. As the path documentation says, parseRelFile does not allow ../. Not really sure how to fix this; I can't figure out any way to read a path with ../ using the path package.
Steps to reproduce:
Clone https://github.com/mtolly/stack-extra - basically it is a repo with files:
stack.yaml
extra1
stack-extra/stack-extra.cabal
stack-extra/extra2
stack-extra/src/Main.hs
The cabal package references the two
extra
files asextra-source-files
, and then uses them inMain.hs
viafile-embed
.Expected:
Modifiying either
extra1
orstack-extra/extra2
should trigger a rebuild of the package.Actual:
Here is the verbose output from the 2nd
stack build
command (the one that doesn't rebuild).What I assume is the same issue:
The text was updated successfully, but these errors were encountered: