Implement recompilation checking for pre-build rules#11731
Merged
mergify[bot] merged 2 commits intohaskell:masterfrom Apr 26, 2026
Merged
Implement recompilation checking for pre-build rules#11731mergify[bot] merged 2 commits intohaskell:masterfrom
mergify[bot] merged 2 commits intohaskell:masterfrom
Conversation
215dc25 to
5703687
Compare
geekosaur
reviewed
Apr 10, 2026
3f72122 to
7328f9c
Compare
6 tasks
geekosaur
approved these changes
Apr 15, 2026
4 tasks
Collaborator
Author
|
Anyone else interested in taking a look? Not sure who to ping. |
philderbeast
approved these changes
Apr 23, 2026
Collaborator
Author
|
Thanks for the suggestions @philderbeast! All applied now. |
Member
|
@sheaf: please add merge labels to the PRs! :) |
This commit adds 'Structured' instances for the 'RuleCommands' and 'RuleData' datatypes. This allows us to serialise and deserialise them, which allows us to compute which rules have changed across builds. This is necessary for recompilation checking for pre-build rules.
This commit adds recompilation logic for SetupHooks pre-build rules.
This implements the behaviour described in the SetupHooks API. That is,
a rule is considered stale if:
[N] The rule is new, or
[S1] A dependency of the rule is stale. That is, either we have
re-run another rule that this rule depends on, or one of the
file inputs to the rule is newer than the oldest output of the
rule (or the rule output doesn't exist at all), or
[S2] The rule itself has changed, e.g. the parameters stored in
RuleData have changed.
Fixes haskell#11730
Contributor
Merge Queue Status
This pull request spent 1 hour 59 minutes 43 seconds in the queue, including 1 hour 49 minutes 6 seconds running CI. Required conditions to merge
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Template Α: This PR modifies behaviour or interface
This PR adds recompilation logic for SetupHooks pre-build rules, implementing the behaviour described in the SetupHooks API. That is, a rule is considered stale if:
RuleDatahave changed.Tested in
cabal-testsuite/PackageTests/SetupHooks/SetupHooksRecompRules/setup.test.hs.