Skip to content

lake: build Strata lib as a test-driver dependency#1138

Merged
shigoel merged 1 commit into
mainfrom
tautschnig/lake-test-deps
May 15, 2026
Merged

lake: build Strata lib as a test-driver dependency#1138
shigoel merged 1 commit into
mainfrom
tautschnig/lake-test-deps

Conversation

@tautschnig
Copy link
Copy Markdown
Contributor

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.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

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>
@tautschnig tautschnig self-assigned this May 7, 2026
@tautschnig tautschnig requested review from a team and Copilot May 7, 2026 11:35
@github-actions github-actions Bot added Waiting-For-Review dependencies Pull requests that update a dependency file labels May 7, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Strata to StrataTestMain.needs so Lake builds Strata prior to executing the test driver.
  • Document why this explicit dependency is required for lake test from a clean .lake.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@shigoel shigoel added this pull request to the merge queue May 15, 2026
Merged via the queue into main with commit 99b84e5 May 15, 2026
26 checks passed
@shigoel shigoel deleted the tautschnig/lake-test-deps branch May 15, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants