Split module interface rule into interface and code outputs - #5057
Merged
fendor merged 1 commit intoAug 27, 2026
Conversation
crtschin
marked this pull request as ready for review
August 27, 2026 00:10
wz1000
approved these changes
Aug 27, 2026
wz1000
left a comment
Collaborator
There was a problem hiding this comment.
Very nice results, this makes a lot of sense.
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.
I initially wanted to optimize interaction times and ran benchmarks. This led me to the high
rulesBuiltnumber for the simple edit benchmark. Using #5055, shows the built rules being dominated by (re)loading module interfaces. This despite the edit only modifying a string in the benchmark, which doesn't touch the module's interface.Investigating this further leads to the fingerprint used to determine when to reload a modules interface. The fingerprint is defined as:
What I think's wrong here is that the core file is more susceptible to being invalidated despite no interface changes occurring. A module's interface being invalidated is infectious, and dirties a module's transitive reverse closure.
This PR fixes it by being explicit on which of a module's artefacts a rule depends on.
GetLinkablecan reference the on-disk core file, whileGetModIfacecan stick to strictly a module's ABI, primarily soGetModIfacecan ignore non-ABI changes.Running the
editbench experiment on bothMultiLayerModulesandMultiLayerModulesNoTHusingcabal benchand the rule build histogram counts from #5055.before with TH
after with TH
before without TH
after without TH
csv comparison results