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

Rebuild on changes in all extra-source-files #6889

Merged
merged 1 commit into from
Jun 11, 2020

Conversation

kmicklas
Copy link
Collaborator

This should alleviate #4746 for most use cases, if the dependent files
are declared in extra-source-files. The downside is that cabal
will not be able to avoid invoking GHC in as many cases, but GHC's
--make should be smart enough to avoid any "actual" rebuilding that
isn't necessary.


  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog (add file to changelog.d directory).
  • The documentation has been updated, if necessary.

Please also shortly describe how you tested your change. Bonus points for added tests!

This should alleviate haskell#4746 for most use cases, if the dependent files
are declared in `extra-source-files`. The downside is that `cabal`
will not be able to avoid invoking GHC in as many cases, but GHC's
`--make` should be smart enough to avoid any "actual" rebuilding that
isn't necessary.
@kmicklas kmicklas requested a review from phadej June 11, 2020 00:59
@phadej phadej merged commit e11768c into haskell:master Jun 11, 2020
@phadej
Copy link
Collaborator

phadej commented Jun 11, 2020

Stuff in extra-source-files are sources, so most likely you want a rebuild when they change.

And stuff like README or CHANGELOG don't change that often.

This is simpler and there are no real drawbacks either.

Thanks!

@kmicklas kmicklas deleted the rebuild-all-extra-source-files branch June 11, 2020 12:53
@phadej phadej added this to the 3.4.0.0-rc1 milestone Jul 10, 2020
@phadej phadej mentioned this pull request Jul 10, 2020
georgefst added a commit to georgefst/monpad that referenced this pull request Dec 22, 2020
Elm wasn't being caught.

I had changed to explicit paths when investigating rebuilds, but it was a red herring - I hadn't realised this fix was only in Cabal 3.4 and I'm using 3.2: haskell/cabal#6889.
georgefst added a commit to georgefst/monpad that referenced this pull request Mar 10, 2021
Needed for cabal to know it needs to rebuild stuff when they change. In 0ded0ff I expected that haskell/cabal#6889 would make this work even for wildcards but this is not the case. A proper fix for haskell/cabal#4746 is probably needed instead.
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

Successfully merging this pull request may close these issues.

2 participants