Skip to content
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

Custom Preprocessed Files Don't Rebuild #1891

Closed
deech opened this issue Mar 9, 2016 · 4 comments
Closed

Custom Preprocessed Files Don't Rebuild #1891

deech opened this issue Mar 9, 2016 · 4 comments
Milestone

Comments

@deech
Copy link
Contributor

deech commented Mar 9, 2016

I have a custom preprocessor that converts files in my src directory to Haskell files. However when any of those originals change stack build doesn't appear to reprocess. If I do stack clean first that works.

@mgsloan
Copy link
Contributor

mgsloan commented Mar 9, 2016

Are those files listed in extra-source-files in your cabal file? If so, this could be a bug. It seems prudent to treat a package as being dirty if these files are changed. I don't see this being done anywhere here

@mgsloan mgsloan added this to the P2: Should milestone Mar 9, 2016
@deech
Copy link
Contributor Author

deech commented Mar 9, 2016

Yes they are. If it helps in my scenario I'm only building executables (no library). As I found out extra-source-files is only allowed once at the top of the Cabal file. If I put it in each executable's stanza, Cabal complains.

@NicolasT
Copy link

NicolasT commented Jul 8, 2016

I believe I'm having a similar issue: a source file is listed in extra-source-files in the global section of my package, and then converted into a data-files member (also listed in the global section) through Custom build (Setup.hs calling out to some tool in the buildHook).

Unexpectedly, whenever I modify the source file, no rebuild is triggered: not when using stack build --file-watch, nor when running plain stack build multiple times.

judah pushed a commit to judah/stack that referenced this issue Jul 10, 2016
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.
judah pushed a commit to judah/stack that referenced this issue Jul 10, 2016
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.
borsboom added a commit that referenced this issue Jul 10, 2016
Let extra-source-files mark a package as dirty (#1891, #2040).
@borsboom
Copy link
Contributor

I think this is resolved by the merge of #2362. Please re-open if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants