test: document single-module library recompilation behavior (#4572)#14103
Merged
rgrinberg merged 1 commit intoocaml:mainfrom Apr 10, 2026
Merged
test: document single-module library recompilation behavior (#4572)#14103rgrinberg merged 1 commit intoocaml:mainfrom
rgrinberg merged 1 commit intoocaml:mainfrom
Conversation
6d8e65b to
76ace5e
Compare
76ace5e to
c66f5d2
Compare
Collaborator
Author
|
@rgrinberg Thanks for your comments on #14079. In the end, I think that only this test can merge in isolation, so I closed that PR and made this one. |
rgrinberg
requested changes
Apr 9, 2026
c66f5d2 to
6b261dc
Compare
Add baseline test showing that single-module library consumers are recompiled when an unused module in a dependency changes. This happens because dune skips ocamldep for singleton stanzas, preventing future per-module filtering from determining which libraries the module actually references. Signed-off-by: Robin Bate Boerop <me@robinbb.com>
6b261dc to
4b8e36a
Compare
Collaborator
Author
|
@rgrinberg I've made your suggested improvements. Back to you to decide if the changes are sufficient. |
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.
Summary
Add baseline test documenting that single-module library consumers are
unnecessarily recompiled when an unused dependency module changes. This
happens because dune skips ocamldep for singleton stanzas, so per-module
filtering cannot determine which libraries the module actually references.
The code change to remove the singleton skip is deferred to the per-module
filtering PR (#14021) where it is actually needed and can be tested
end-to-end.
Ref: #4572
Test plan
dune runtest test/blackbox-tests/test-cases/per-module-lib-deps/single-module-lib.tpasses