Repository navigation
Conversation
toComponentLocalBuildInfos built a graph of every installed package, unioned it with the component graph and took the closure. Only installed packages reachable from the components can be in that closure, so look those up by UnitId and build the graph from them. The closure is unchanged. Addresses haskell#12546.
Lotion-3
force-pushed
the
perf/installed-closure
branch
from
November 21, 2026 06:15
a8bdcf2 to
1a3cba1
Compare
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.
Addresses part of #12546.
toComponentLocalBuildInfosbuilt aGraphof every installed package, unioned it with the component graph and took the closure. Only installed packages reachable from the components can be in that closure, so this looks them up byUnitIdand builds the graph from those. Installed packages with the sameUnitIdas a component are skipped, sinceunionRightreplaced them, and missing dependencies are still reported byGraph.broken.The closure is the same, including its order, which
PackageIndex.fromListdepends on for instances of the same package. I compared the old and new code on 3,600 random installed-package graphs, with shared package names, shadowed keys and missing dependencies: the closure, thePackageIndexbuilt from it andGraph.brokenwere identical in every case.Time for this step, per component (synthetic package index, GHC 9.10.3, Windows 11):
This doesn't touch the other costs in #12546:
PackageIndex.fromListanddependencyInconsistenciesstill run on the closure for each component.The Backpack, BuildDeps, InternalLibraries and ConfigureComponent tests pass, except
Backpack/Includes2andInternalLibraries/setup-gen-script, which fail the same way on master on my Windows machine.Template B: This PR does not modify behaviour or interface