mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#8876
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8911
Author: @SpicyMarinara
Created: 11/6/2026
Status: ✅ Merged
Merged: 11/6/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/termux-shared-build-heap📝 Commits (1)
457d96bfix(shared): build shared types within Termux's 1 GiB heap (#8902)📊 Changes
4 files changed (+101 additions, -3 deletions)
View changed files
📝
android/README.md(+1 -1)📝
packages/shared/package.json(+2 -2)➕
packages/shared/scripts/tsc-build.mjs(+47 -0)➕
scripts/regressions/launcher/termux-shared-build.regression.mjs(+51 -0)📄 Description
Linked issue
Closes #8902
Why this change
After updating to 2.5.2, switching to staging, or reinstalling, Marinara Engine no longer starts in Termux. Every screenshot in the Discord thread shows the same failure. During "Building shared types",
tscinpackages/sharedhits the 1024 MiB heap the launcher gives Node and aborts:FATAL ERROR: Ineffective mark-compacts near heap limit … JavaScript heap out of memory, exit 134.The cause is growth in the shared package. From 2.5.1 to 2.5.2 it gained about 53,000 lines, mostly
schemas/ruleset.schema.ts(26,486 lines of zod) andfeatures/ruleset-combat/*. Measured on staging:tsc --noEmit(type-check only)tsc --noCheck, no declarationsThe server already transpiles with esbuild on Android, and the client already skips its type-check there. The shared package was the only build still type-checking on a phone.
What changed
packages/shared/scripts/tsc-build.mjs. Bothbuildandbuild:preservenow end withnode scripts/tsc-build.mjsinstead oftsc.MARINARA_LOW_MEMORY_BUILD=1(the server's and client's existing low-memory test), it runstsc --noCheckwith no declarations, composite or incremental output.tsc, so desktop and CI builds still type-check and emit declarations.--filter @marinara-engine/shared build, so all three get the fix.scripts/regressions/launcher/termux-shared-build.regression.mjschecks:--max-old-space-size=1024and writesconstants/defaults.js, the file the launcher checks for, with no declarations.android/README.md: one sentence on the shared build's low-memory path.Workaround until this reaches
main: on a phone with about 4 GB of RAM or more, start withNODE_OPTIONS="--max-old-space-size=1536" ./start-termux.sh. This is the documented heap override, and the full shared build fits within it (about 1.5 GB peak RSS here).Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
./start-termux.sh, and confirm "Building shared types…" prints[build] Android/low-memory shared build: emitting JavaScript without type-checking.and the app starts.pnpm buildstill writespackages/shared/dist/**/*.d.ts.Agent-run checks:
pnpm check: passes.open-issuesregression (which pinsbuild:preserve): passes.package.jsonchange.MARINARA_LOW_MEMORY_BUILD=1 NODE_OPTIONS=--max-old-space-size=1024 pnpm --filter @marinara-engine/shared buildpasses at 675 MB peak RSS. The normal build still emits 344.jsand 344.d.tsfiles.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Only
android/README.mdchanged; nothing underdocs/, so no translated pack needs updating.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.