Repository navigation
test: document inter-library recompilation behavior (#4572) - #14017
Conversation
b8ef260 to
fc8f499
Compare
Leonidas-from-XIV
left a comment
There was a problem hiding this comment.
I am concerned about dumping the list of calls into the tests as that list might change as Dune evolves. Instead I would suggest using sideeffects to show that a module was rebuilt and then check for that sideeffect.
This way if dune builds less or more the tests don't need to be changed in the future due to unrelated changes.
ca96e99 to
43bdd12
Compare
|
@Leonidas-from-XIV @rgrinberg I think I have made the PR according to your suggestions, now. So, after a rebase against 'main', I removed the 'draft' status, and would appreciate a passing review (if merited). If you see a passing CI and a passing review, feel free to merge it, too, please. |
99b35ea to
3f0a685
Compare
b7793c6 to
fd06025
Compare
…ml#4572) Document the current behavior where all modules in a stanza are recompiled when a library dependency's interface changes, even if a module doesn't use that library. Five scenarios are tested: 1. Basic: wrapped library, module that doesn't reference it 2. Transitive: library A depends on B, module doesn't reference A 3. Virtual: virtual library, module that doesn't reference it 4. Multiple libraries: two libraries, modules using only one 5. Unwrapped: individual modules within an unwrapped library, with symmetric tests for changing each module independently Each scenario shows the current stanza-level recompilation behavior and annotates the expected improvement with TODO comments. See: ocaml#4572 Signed-off-by: Robin Bate Boerop <[email protected]>
fd06025 to
e35a3d1
Compare
|
@shonfeder What is the rush? I self-requested a review and was still in the middle of one. |
|
No rush. I didn't see that you had re-requested review (too much noise in the history to track that imo). But it had been reviewed by you and changes addressed. You didn't mark it as "request changes", to signal you had a blocking concern. It was approved in a review, and passing CI, and it can't possible do any harm to merge. So it looked ready. Feel free to add follow-ups if needed, or even revert if you think it's necessary for some reason. |
Summary
Add baseline tests documenting Dune's current inter-library recompilation
behavior, in preparation for eventually addressing #4572 (finer dependency
analysis between libraries).
Currently, Dune overapproximates by assuming that every module in a consuming
stanza depends on every module in its library dependencies. These tests
document that behavior across 9 scenarios:
(wrapped (transition ...))library, all inner modules recompileNo source code changes. Tests only.
Test plan
dune runtest test/blackbox-tests/test-cases/per-module-lib-deps/passesRef: #4572