-
Notifications
You must be signed in to change notification settings - Fork 843
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Plan build when test components are added #1399
+ changes the ensureConfig logic to ignore the list of components, as it does not affect the config of the package. + avoid reconfigures when the new deps are a subset of the old deps
- Loading branch information
Showing
2 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ac57440
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@snoyberg @borsboom I think this is all sensible, but I want to makes sure. In order to fix #1399 , we consider any added component to cause config dirtiness while constructing the plan. The restriction to just lib / exes came from before #1166 (all-in-one-builds) was implemented, and should have been removed.
However, changing this caused rebuilds when switching between build and test. This required two resolutions:
configCacheComponents
when determining if we need to reconfigure the package. This is fine since it doesn't actually affect the arguments passed to the configuration. EDIT: actually, it makes even more sense to only configure whenconfigCacheOpts
changes - I've made that change: 7cd87cbconfigCacheDeps
to be a subset of the old set of deps. I think this happens because it's comparing the present deps against all the deps. I can't think of any cases where allowing a subset of the old deps changes things. In all the cases that matter (e.g. removing a dep from a cabal file), file dirtiness will cause it to be rebuilt.Also, this seems like an important thing to fix. Might be good to release a
0.1.8.1
soonish, once we're sure this doesn't introduce any bad regressions.ac57440
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without diving deeply into this, I've reviewed, and I think the change is fine.