Drop gtb turbo's Android escape hatch for the npm turbo - #349
Conversation
turbo 2.10.8 publishes its linux-arm64 binary under os: ["android", "linux"] (vercel/turborepo#12735), so node_modules/.bin/turbo starts on Termux and the pkg-install resolution of $PREFIX/bin/turbo in `gtb turbo` is obsolete. In its place `gtb turbo` rewrites every PATH entry to an absolute path. turbo resolves the package manager against PATH from the directory it was invoked in and keeps the path that search produced, then runs each task with that package's directory as the cwd -- so a match from a relative entry is re-interpreted against the child's directory and the spawn fails with ENOENT. pnpm always prepends a relative ./node_modules/.bin, which is exactly where @gtbuchanan/pnpm-termux-shim installs its pnpm. That makes the shim the mechanism the npm turbo depends on rather than a defensive dependency, so this repo now dogfoods it as a workspace-root optionalDependency. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (77.77%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
vercel/turborepo#12735 shipped in turbo 2.10.8, publishing the
linux-arm64binary underos: ["android", "linux"].node_modules/.bin/turbonow starts on Termux, sogtb turbono longer resolves apkg install turbobinary from$PREFIX/bin/turbo.That fixes the launcher, but not how turbo spawns tasks. The npm binary is statically linked (no
PT_INTERP), so Termux'slibtermux-exec-ld-preload.soshebang rewriter never loads into it andexecveon$PREFIX/bin/pnpmhits its literal#!/usr/bin/env node, which Android has no/usr/bin/envfor.@gtbuchanan/pnpm-termux-shimremains the fix for that — it moves from a defensive dependency to the mechanism the npm turbo depends on, so this repo now dogfoods it as a workspace-rootoptionalDependency.Why
gtb turbostill existsInstalling the shim is what makes the wrapper load-bearing. turbo resolves the package manager against PATH from the directory it was invoked in, keeps the path that search produced, then runs each task with that package's directory as the cwd — so a match from a relative entry is re-interpreted against the child's directory and the spawn fails. pnpm always prepends a relative
./node_modules/.bin, which is exactly where the shim installs itspnpm.gtb turbonow rewrites every PATH entry to an absolute path before invoking turbo. Isolated on-device:pnpmat<root>/<entry>pnpmat<pkg>/<entry>./packages./relbin(probe)./relbin(probe)unable to spawn child process, absolute entry never tried ❌Non-Android hosts are unaffected either way: the shim's
osfilter means nothing namedpnpmoccupiesnode_modules/.bin, so the relative entry never matches and the normalization is a no-op.Verification
pnpm build --concurrency=1on Termux/aarch64: 73/73 tasks,gtb verifycleanpnpm run gtb turbo run typecheck:tsexercises the real pnpm-injected PATH end to endwithAbsolutePathEntries, written before the implementation and confirmed failing firstNotes
gtb-build-pipelineskill (Android-Termux section, description, and two evals that encoded the removed behavior), both package READMEs,CONTRIBUTING.md, andAGENTS.mdAGENTS.md's "Why turbo isn't in mise.toml" reasoning is unchanged — #12735 widened theosfield of the existing npm package rather than adding standalone release binaries, so mise still has no backend with per-platform integrity🤖 Generated with Claude Code