Repository navigation
fix(extension): give the app's Vite build a 4 GB heap (Closes #2201) - #2202
Merged
Merged
Conversation
vsix-gate failed at random: the app's Vite build (bun run build, in Node) ran
out of memory at the default ~2 GB heap ("JavaScript heap out of memory" at
about 2025 MB, then SIGABRT). The build peaks near that limit, so some runs
passed and some failed.
build_app_bundle.mjs now passes NODE_OPTIONS=--max-old-space-size=4096 to the
build step only, through withHeapLimit (new build_app_heap.mjs). It keeps other
NODE_OPTIONS flags and does not override a limit the caller already set. The
deploy_guard fixture copies the new helper next to the script.
Refs #2201
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
Related Issue
Closes #2201
Description
vsix-gatefailed at random. The app's Vite build (bun run build, run in Node) ran out of memory at Node's default heap of about 2 GB. The logs showJavaScript heap out of memoryat 2025 MB and 2028 MB, then SIGABRT. The build peaks near the limit, so some runs pass and some fail. Evidence: runs 46968852814 and 46508428057, and three failures on PR #2194.Fix.
build_app_bundle.mjspassesNODE_OPTIONS=--max-old-space-size=4096to the Vite build step only. The newwithHeapLimithelper (scripts/build_app_heap.mjs) keeps otherNODE_OPTIONSflags and does not override a limit the caller already set. Thedeploy_guardfixture copies the helper next to the script, because it copies the script files one by one.Changes:
scripts/build_app_heap.mjs(new),scripts/build_app_bundle.mjs,test/build_app_heap.test.ts(new, written first),test/deploy_guard.test.ts(fixture).Type of Change
Verification
pnpm -r run buildexits 0pnpm -r run testexits 0 (orpnpm -r run typecheckif tests aren't relevant)pnpm -r run typecheckpasses. The new test failed before the helper existed and passes now (4 tests).deploy_guard.test.tspasses (41 tests). I ran only these two test files locally. CI runs the full suite.Manual Testing Notes
vsix-gateto pass on repeated runs, and I will check that after the merge.🤖 Generated with Claude Code