mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7198] [MERGED] fix(termux): remove the dead .npmrc architecture block #7620
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#7620
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/7198
Author: @SpicyMarinara
Created: 10/6/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/termux-arch-flags-7178📝 Commits (8)
904834bfix(termux): remove the dead .npmrc architecture block912ace7test(termux): pin the default pnpm target in every config pnpm reads23660c9Merge origin/staging into fix/termux-arch-flags-7178d33ff60docs(changelog): note the Android app start no longer refreshes dependencies (#7178)b32f559Merge origin/staging into fix/termux-arch-flags-7178336175dMerge remote-tracking branch 'origin/staging' into fix/termux-arch-flags-7178b0c826etest(termux): parse lockfile entries by key and reject negated architectures (#7178)ced325dMerge remote-tracking branch 'origin/staging' into fix/termux-arch-flags-7178📊 Changes
3 files changed (+70 additions, -31 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)➕
scripts/regressions/termux-native-deps.regression.mjs(+65 -0)📝
start-termux.sh(+4 -31)📄 Description
Linked issue
Closes #7178
Why this change
start-termux.shappendedsupportedArchitectures.os[]/cpu[]lines (current,linux, the CPU andwasm32) to the tracked.npmrc. pnpm 10.34.5 readssupportedArchitecturesonly frompnpm-workspace.yaml, the rootpackage.jsonpnpmfield, or--os/--cpu/--libc, so those lines never did anything. Termux has always installed with pnpm's defaultandroid/<arch>target. The block also left.npmrcmodified on every device, so each launcher update had to stash and restore it.--os android --cpu arm64installed the Android builds of every native loader:@esbuild/android-arm64,@rollup/rollup-android-arm64,lightningcss-android-arm64,@tailwindcss/oxide-android-arm64and@napi-rs/canvas-android-arm64.process.platform, which isandroidon Termux, so a Linux package would never be loaded. Termux uses Android's own C library (Bionic), and the glibc/musl builds cannot load there anyway.@img/sharp-wasm32, is a regular server dependency since #7173, so it is installed whatever the CPU setting.onnxruntime-nodekeeps its binaries inside its own package and has no Android build. The architecture setting does not change that, andensure-native-depsalready skips it on Android.--os linux --cpu wasm32would install 28 platform packages instead of 11, about 540 MB more. Most of that is the two Linuxclaude-agent-sdkbinaries (about 220 MB each), and none of it would load.git checkout --detach -f <release commit>, which resets the tracked.npmrc. The old block then found its marker missing, re-added the lines and setTERMUX_FORCE_INSTALL=1, so each app start ranpnpm store pruneand "Installing dependencies (refreshing for platform fix)". Without the block, an app start installs only whennode_modulesis missing or out of date. This applies to APKs built from a commit that includes this change.What changed
start-termux.sh: removed the.npmrcarchitecture block and theTERMUX_FORCE_INSTALLtrigger it set, including the "(refreshing for platform fix)" install message. Added a short comment ininstall_workspace_dependenciessaying pnpm's default target is the correct one..npmrcfiles keep their inert lines. Nothing rewrites or deletes them.scripts/regressions/termux-native-deps.regression.mjs:start-termux.sh,.npmrc,pnpm-workspace.yaml, rootpackage.json) setssupportedArchitecturesor restores the force trigger.@tailwindcss/oxideand@napi-rs/canvasstill has anandroid/arm64optional build. A future upgrade that drops one fails the regression.CHANGELOG.md: one[Unreleased]entry, which also mentions the faster Android app start.packages/server/src/routes/updates.routes.ts) is unchanged. It never read the.npmrclines, and it runsinstall --force, which installs every optional package and ignores--os/--cpu. I confirmed this with a scratch install: all 25 of rollup's platform packages were installed under--force --os android --cpu arm64.Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-run evidence, to be confirmed by a human:
pnpm checkexited 0 on the branch.node scripts/regressions/termux-native-deps.regression.mjspasses. It fails as intended with the oldstart-termux.shand withlightningcss-android-arm64relabelledos: [linux]in the lockfile.node scripts/regressions/launcher/update.regression.mjsandnode scripts/regressions/launcher/termux-client-build.regression.mjspass.node scripts/regressions/termux-sharp.regression.mjspasses when pointed at the populated pnpm store. In a fresh worktree whose relative.pnpm-storeis empty, it fails withERR_PNPM_NO_OFFLINE_TARBALL; this change does not cause that.--frozen-lockfile --ignore-scripts):.npmrclines only (macOS): darwin builds only; no Linux or WASM optional package was installed.--os android --cpu arm64: the 11 Android/WASM packages listed above.--os android --os linux --cpu arm64 --cpu wasm32: 28 packages.coderabbit review --agent --committed) reported one trivial finding: also coverpnpm-workspace.yamlandpackage.json. It is fixed in912ace77b.Adversarial verification (second agent), on the branch merged with
stagingat93834b5ab:node --importthat setsprocess.platformtoandroid, so pnpm's own default target isandroid/arm64, as on a phone..npmrc) and old launcher (.npmrcwith the# termux-supported-architectureslines) installed the same 12 platform-specific packages and a 787 MB virtual store. The lines are inert on Android too.--os current --os linux --cpu current --cpu arm64 --cpu wasm32) would add 17 Linux/WASM packages and about 578 MB.@tailwindcss/oxideand@napi-rs/canvas(a regular dependency ofpdf-parse) each resolve theirandroid-arm64package and fail only atdlopen, as expected on macOS. esbuild spawns@esbuild/android-arm64/bin/esbuild, an Android ELF linked against/system/bin/linker64. sharp loads through@img/sharp-wasm32.git checkout --detach -fon the same commit discards a modified.npmrc, and the old block then setsTERMUX_FORCE_INSTALL=1. Reproduced with staging's block and anodeshim reportingandroid.pnpm checkexited 0. These pass:termux-native-deps(also fails when rollup's Android build is removed from the lockfile, and against staging'sstart-termux.sh),pnpm regression:launcher-update,launcher/termux-client-build,termux-sharp(with the shared store),termux-postmortem,open-issues,android-local-authandrestart-supervisor.bash -n start-termux.shis clean, and no removed variable is still used.complete-node-regressionsrunspnpm regression, which picks up*.regression.mjs.Manual verification notes
docs/installation/android-termux.md. Confirm thatgit statusshows.npmrcunchanged, the client build finishes, and Engine opens athttp://127.0.0.1:7860..npmrcalready has the# termux-supported-architectureslines. Update to this branch with./start-termux.sh, and confirm that the update's stash and restore keep those lines, that dependencies install without "(refreshing for platform fix)", and that the server starts.ls .pnpm | grep -E "android-arm64|sharp-wasm32"(this repo's.npmrckeeps the virtual store in.pnpm, notnode_modules/.pnpm) lists the esbuild, rollup, lightningcss, oxide, napi-rs canvas and sharp WASM packages, and that generating a sprite or thumbnail still works.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Only
CHANGELOG.mdchanged. No guide underdocs/,android/README.mdordocs/TROUBLESHOOTING.mddescribes the removed block, so no translation follow-up is needed.Out of scope, noted for a follow-up: the in-app updater's Android install uses
install --force, so it installs every platform's optional binaries, including all eightclaude-agent-sdkbuilds (about 220 MB each). In the Termux simulation,--forceinstalled 126 platform-specific packages and a 3.4 GB virtual store, against 12 packages and 787 MB without it. Thestart-termux.shcomment already warns against--forceon Android. This PR does not change that path.UI evidence (if applicable)
Not applicable (launcher script and regression only).
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.