Skip to content

Compile once for the whole repository - #1496

Closed
cristianrgreco wants to merge 1 commit into
claude/lint-whole-repofrom
claude/compile-whole-repo
Closed

cristianrgreco wants to merge 1 commit into
claude/lint-whole-repofrom
claude/compile-whole-repo

Conversation

@cristianrgreco

@cristianrgreco cristianrgreco commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Folded into #1495.


Stacked on #1495. Review and merge that one first.

Summary

Replaces the per-module compile matrix with one Compile job that runs npm run check-compiles (tsc -b packages/testcontainers packages/modules/*).

  • It type-checks the same 44 projects as before, test files included. Each one is built from its tsconfig.json, the same file the matrix jobs used.
  • npm-setup: workspace is now optional. Left empty, it installs every workspace and caches the result under an all-workspaces key. The Compile job uses this. Existing callers and their cache keys are unchanged.
  • The job is still skipped when no package changed, and it still waits on Lint.

Why

A clean whole-repository build takes about 1.7s locally. On a recent all-green run of Checks, compiling took 44 jobs and 415s of runner time, because every job rebuilt testcontainers before checking its own module.

It doesn't catch more type errors than before. No module depends on another module, and a change to testcontainers or a shared file already recompiled every package.

Verification

  • npm run check-compiles from a clean state: passes.
  • Red: with a test file containing a type error added under packages/modules/redis/src, it exits 2 and reports TS2322 for that file.
  • The npm-setup change is identical to the one in Detect unused code and dependencies with knip #1492, where it ran on CI: the first run missed and saved the all-workspaces cache (npm ci took 35s), and the next run restored it (install step 11s).
  • checks.yml and action.yml parse. npm run format: no fixes applied.
  • Checks runs on this PR as part of the stack. An earlier revision of this change passed it in full, with the single Compile job and all 176 test jobs green.

Why this isn't breaking

CI-only. No package source, dependency or published file changes.

The check name changes from Compile (<module>) to Compile. main has no branch protection or required status checks, so nothing needs updating.

@cristianrgreco cristianrgreco added maintenance Improvements that do not change functionality patch Backward compatible bug fix labels Oct 10, 2026
@cristianrgreco
cristianrgreco added this pull request to stack #1498 October 10, 2026 20:35
Comment thread .github/workflows/checks.yml Outdated
Replace the per-module compile matrix with one job that runs
`npm run check-compiles`, a project-references build of every package.
npm-setup installs every workspace when it isn't given one.
@cristianrgreco
cristianrgreco removed this pull request from stack #1498 October 11, 2026 18:15
@cristianrgreco
cristianrgreco force-pushed the claude/compile-whole-repo branch from 26288f4 to a93d924 Compare October 11, 2026 18:15
@cristianrgreco
cristianrgreco added this pull request to stack #1501 October 11, 2026 18:15
@cristianrgreco
cristianrgreco removed this pull request from stack #1501 October 11, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Improvements that do not change functionality patch Backward compatible bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant