build: type-check via tsgo project references, decoupled from bundler#795
Open
lukecotter wants to merge 1 commit into
Open
build: type-check via tsgo project references, decoupled from bundler#795lukecotter wants to merge 1 commit into
lukecotter wants to merge 1 commit into
Conversation
- replace the three inline `tsc --noemit` calls (build:dev, build:dev:fast, lint) with one `tsgo -b` over project references; swc/rolldown stay transpile-only - wire references: apex-log-parser becomes composite (emitDeclarationOnly), log-viewer/lana reference it, new root solution tsconfig — enables incremental caching - gate prod `build` on `typecheck` and run it in `lint` (preserves CI PR gate); add @typescript/native-preview (tsgo), ~7.7x faster cold than tsc
b5597ad to
3cc693c
Compare
14 tasks
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.
📝 PR Overview
The bundlers we use are type-blind —
rollup(via swc) androlldownonly transpile, they never type-check. Today three identicaltsc --noemitcalls are copy-pasted intobuild:dev,build:dev:fast, andlint, welding type-checking into the bundler step, andcomposite: truewas set on two projects with noreferences(dead config). This makes type-checking a single, separate step over TypeScript project references, run by the Go-nativetsgofor speed.🛠️ Changes made
tsc --noemit -p …calls with one project-references build: bundlers (build:dev/build:dev:fast) are now transpile-only; type-checking is thetypecheckscript.apex-log-parserbecomescomposite(emitDeclarationOnly),log-viewer/lanareference it, and a new root solutiontsconfig.jsonorchestrates the graph — enabling incremental.tsbuildinfocaching (skip unchanged projects).typecheck(tsgo -b) andtypecheck:tsc(tsc -b, fallback/parity).@typescript/native-preview(tsgo) is ~7.7× faster on cold runs (~0.3s vs ~2.3s); warm/incremental runs are sub-150ms for both.buildontypecheck, and run it insidelint— preserving the existing CI PR gate (ci.yml's Verify Files job runspnpm run lint). Devwatchstays check-free (IDE/LSP handles it)..gitignore: add*.tsbuildinfo.🧩 Type of change (check all applicable)
🔗 Related Issues
✅ Tests added?
📚 Docs updated?
Test plan
pnpm lint(eslint + prettier +tsgo -b) — greenpnpm test— 886/886 passpnpm run typecheckcold/incremental verified;typecheck:tscparity (same diagnostics)typecheck/build/lintbutbuild:devstill bundles; prodbuild+build:dev:fastgreenAnything else we need to know? [optional]
tsgois a TypeScript 7 preview; it agreed with stocktsc -bhere, andtypecheck:tscis a one-word fallback if the preview ever drifts. Consumers resolveapex-log-parservia sourcepaths(shared with the swc bundler config), so the reference provides build ordering + incremental caching rather than cross-project dedup — a deliberate trade to avoid bundler-config changes.