Skip to content

Compile once for the whole repository - #1496

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

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

Conversation

@cristianrgreco

Copy link
Copy Markdown
Collaborator

Stacked on #1495, which is stacked on #1492. Review and merge those 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.
  • The job installs every workspace through npm-setup (the mode added in Detect unused code and dependencies with knip #1492).
  • It's still skipped when no package changed, and it still waits on Lint.

Why

A clean whole-repository build takes about 1.7s locally. On the last 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.
  • checks.yml parses. The compile job has no matrix, keeps if: modules_count != '0' and needs: [detect-modules, lint].
  • npm run format: no fixes applied.
  • Not verified: the Checks workflow only runs for PRs that target main, so it won't run on this PR until the PRs below it merge and this one is retargeted.

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.

Replace the per-module compile matrix with one job that runs
`npm run check-compiles`, a project-references build of every package.
@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

This branch has not been deployed

No deployments
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