lake: build Strata lib as a test-driver dependency#1138
Merged
Conversation
The `StrataTestMain` test driver spawns `lean` on files under `StrataTestExtra/`, which is not declared as a `lean_lib`. Some of those files (e.g. `DDM/Integration/Java/TestGen.lean`) import modules from the `Strata` library that are not in `StrataTest`'s transitive closure, most notably `Strata.DDM.Integration.Java`. Before this change, `lake test` on a clean `.lake` would only build the closure reachable from `StrataTest` and then fail at subprocess time with: error: object file '.../Strata/DDM/Integration/Java.olean' of module Strata.DDM.Integration.Java does not exist Running `lake build` first masked the bug because the `Strata` library is in `defaultTargets`. Add `Strata` to the `needs` list of `StrataTestMain` so Lake builds the full `Strata` library before the test driver runs, regardless of whether `lake build` was run beforehand. Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Ensures lake test builds the full Strata library before running the StrataTestMain driver, preventing missing .olean failures when the test driver spawns lean on StrataTestExtra/ files that import non-transitively-reachable Strata modules.
Changes:
- Add
StratatoStrataTestMain.needsso Lake buildsStrataprior to executing the test driver. - Document why this explicit dependency is required for
lake testfrom a clean.lake.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
joehendrix
approved these changes
May 7, 2026
aqjune-aws
approved these changes
May 7, 2026
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.
The
StrataTestMaintest driver spawnsleanon files underStrataTestExtra/, which is not declared as alean_lib. Some of those files (e.g.DDM/Integration/Java/TestGen.lean) import modules from theStratalibrary that are not inStrataTest's transitive closure, most notablyStrata.DDM.Integration.Java.Before this change,
lake teston a clean.lakewould only build the closure reachable fromStrataTestand then fail at subprocess time with:error: object file '.../Strata/DDM/Integration/Java.olean' of module
Strata.DDM.Integration.Java does not exist
Running
lake buildfirst masked the bug because theStratalibrary is indefaultTargets.Add
Stratato theneedslist ofStrataTestMainso Lake builds the fullStratalibrary before the test driver runs, regardless of whetherlake buildwas run beforehand.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.