Repository navigation
Typecheck in one incremental pass (CL-7483) - #673
Merged
Merged
Conversation
The native TypeScript-in-Go preview (tsgo) is a drop-in for tsc's CLI surface here — every generated tsconfig, the composite build root, and the three top-level projects check clean under it with identical diagnostics, and it still fails on a type error in a src file or a test file. Swapping it in for both the composite build and the 113 per-package --noEmit checks cuts the warm CI typecheck job from ~444s of mostly redundant re-checking to well under a minute.
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.
Resolves CL-7483
Problem
bun run typecheckrantsc --build tsconfig.build.json(fast, cached) andthen 113 separate
tsc -p <project>/tsconfig.json --noEmitprocesses plusthree root projects, each a from-scratch, non-incremental full check. That
second phase dominated: ~400 of CI's ~444s warm.
Change
Swap
tscfor@typescript/native-preview(tsgo) inscripts/typecheck.tsfor both the composite
--buildand every per-package--noEmitcheck.tsgo is a drop-in for the CLI surface used here — no unsupported-option
failures across the build root, all 113 generated per-package projects, or
the three top-level projects — and it reports the same (empty) diagnostic
set as
tscon this commit. Confirmed it still fails correctly on a typeerror introduced in a src file and in a test file (reverted after).
Pinned
@typescript/native-previewinpackage.jsondevDependencies; theCI tsbuildinfo cache step in
.github/workflows/ci.ymlneeded no changessince tsgo writes the same build-info files at the same paths.
Before / after (local, this machine)
Local numbers aren't representative of the CI runner's slower/fewer cores,
which is why the CI job's ~444s baseline is the number that mattered here.
CI timing after this change is in the PR checks.
Test plan
bun run typecheckpasses clean on this branchpackages/access-policy/src/schema.ts,confirmed
bun run typecheckfails, revertedpackages/access-policy/test/store.drizzle.test.ts, confirmedbun run typecheckfails, revertedbun run check:structuralpassesbun run lintpasses