Conversation
Alizter
force-pushed
the
dev-tool-compiler-reuse
branch
from
September 7, 2026 16:49
a426298 to
aebe32b
Compare
Recompute compiler-sensitive dev-tool dependency closures with the project compiler entry so they refer to its existing build artifacts. Keep only the rewritten reachable closure when merging package tables. Signed-off-by: Ali Caglayan <alizter@gmail.com>
Alizter
force-pushed
the
dev-tool-compiler-reuse
branch
from
September 8, 2026 12:25
aebe32b to
0768c51
Compare
Collaborator
Author
|
This is not going to work in this manner. |
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.
Description
Reuse the project compiler when building compiler-sensitive dev tools whose
lock directories select the same compiler name and version.
For each such dev tool, this change traverses the dependency closure from the
tool package, replaces the matching compiler node with the project compiler
entry, and recomputes the dependent package digests. Only the rewritten,
reachable closure is merged into the package database.
Motivation
A dev-tool lock directory can retain an older dependency closure after the
project lock directory changes without changing the compiler's name or version.
Previously, Dune merged both digest-keyed closures. This rebuilt a compiler that
was already built for the project and allowed obsolete compiler dependencies
from unrelated dev-tool lock directories into
@pkg-install.The regression coverage was merged in #16350. This fix is also a prerequisite
for #16292.
Testing
dune build @check @fmtdune runtest test/blackbox-tests/test-cases/pkg/merlin