build(lint): run ESLint in two passes so the gate stops running out of heap - #698
Merged
Merged
Conversation
…f heap Folding the package lint into the engine's invocation put one type-aware program for the engine, its tests, the examples, the scripts and every package in a single heap, which reached V8's 4 GB ceiling and failed the push gate with an out-of-memory crash rather than a lint error. It did so intermittently, depending on what else the machine had just done - a build beforehand was enough to tip it. `scripts/lint.ts` runs the same globs as two passes, one process each, and forwards its arguments to both, so `pnpm lint --fix` and `lint:fast`'s `--cache` still behave as one invocation. Nothing is linted twice; each pass's memory is returned when its process exits. Raising the heap ceiling was the alternative and is the wrong direction for a gate: it hides the growth and moves the failure onto whichever machine has the least memory.
Exoridus
enabled auto-merge (squash)
September 6, 2026 20:34
Bundle ReportChanges will increase total bundle size by 19.25MB (60.14%) ⬆️
Affected Assets, Files, and Routes:view changes for bundle: site-server-esmAssets Changed:
App Routes Affected:
|
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.
Summary
Folding the package lint into the engine's invocation (#688) put one type-aware program for the engine, its tests, the examples, the scripts and every package into a single heap. That reached V8's 4 GB ceiling and failed the push gate with an out-of-memory crash rather than a lint error - intermittently, because whether it tipped depended on what the machine had just done. A
build:allbeforehand was enough.scripts/lint.tsruns the same globs as two passes, one process each, and forwards its arguments to both, sopnpm lint --fixandlint:fast's--cachestill behave as one invocation. Nothing is linted twice, and each pass's memory is returned when its process exits.Why not raise the ceiling
Node caps the default old space at about 4.3 GB on 64-bit regardless of installed RAM, so a 64 GB workstation and a 16 GB CI runner hit the same wall. Passing
--max-old-space-size=8192would clear it on both, and would move the failure onto whichever machine has the least memory: past physical RAM, V8 no longer fails with a clean heap error, the operating system swaps or kills the process. For a gate that has to run on other people's machines, less work under the ceiling beats a higher ceiling - and the ceiling is also what reported the regression in the first place.Verification
pnpm lint:allgreen immediately afterpnpm build:all, which is the sequence that crashedtest/ci/green (269 tests),typecheck:scriptscleanverify:quickplus every lane the range selects