Repository navigation
perf(packaging): drop go build -a, keep JS deps between builds, no Metro in release mobile builds (untested on build machine) - #29764
Merged
chrisnojima merged 4 commits intoOct 15, 2026
Conversation
chrisnojima
added this pull request to stack #29759
October 12, 2026 19:16
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The multi-platform release pipeline changes still require the stated macOS, iOS, Android, and Windows build-machine validation.
0 open findings
What changed in this PR
Optimizes multi-platform release packaging by reusing Go/JS caches and removing unnecessary Metro processes.
Changes:
- Reuses
node_modulesand conditionally prunes Yarn caches. - Drops forced Go rebuilds while guarding macOS cache validity.
- Relies on native release bundling for Android and iOS.
| File | Description |
|---|---|
.github/workflows/shellcheck.yml |
Removes deleted script from ShellCheck. |
packaging/README.md |
Documents caching and mobile bundling. |
packaging/android/build_and_publish.sh |
Reuses dependencies and removes Metro startup. |
packaging/build_darwin.sh |
Conditionally prunes the Yarn cache. |
packaging/desktop/package_darwin.sh |
Reuses unchanged JS dependencies. |
packaging/ios/build_and_publish.sh |
Reuses dependencies and removes Metro startup. |
packaging/lib.sh |
Adds Yarn and Go cache helpers. |
packaging/manage_react_native_packager.sh |
Deletes obsolete Metro management. |
packaging/prerelease/build_app.sh |
Guards the macOS Go cache. |
packaging/prerelease/build_kbfs.sh |
Removes forced Go rebuilds. |
packaging/prerelease/build_keybase.sh |
Removes forced Go rebuilds. |
packaging/prerelease/build_updater.sh |
Removes forced Go rebuilds. |
packaging/windows/build_prerelease.cmd |
Removes forced Windows Go rebuilds. |
shared/package.json |
Removes the legacy Metro command. |
shared/react-native/packageAndBuild.sh |
Deletes the obsolete bundler launcher. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
zoom-ua
reviewed
Oct 13, 2026
chrisnojima
marked this pull request as ready for review
October 14, 2026 13:51
chrisnojima
force-pushed
the
nojima/HOTPOT-packaging-speed
branch
from
October 14, 2026 14:01
968dacd to
ce377ff
Compare
chrisnojima
force-pushed
the
nojima/HOTPOT-packaging-speed
branch
from
October 14, 2026 17:42
c24b89d to
24ecdff
Compare
…no Metro in release mobile builds - prerelease/build_*.sh and windows/build_prerelease.cmd no longer pass -a; the Go build cache is safe to reuse. - lib.sh: kb_prune_yarn_cache cleans the yarn cache only when free disk is under KB_MIN_FREE_GB (default 30); kb_yarn_modules keeps node_modules unless yarn.lock, package.json or a patch changed. - iOS and Android release builds bundle their own JS (Release config / non-debuggable variant), so the Metro packager and manage_react_native_packager.sh are gone.
…hem without the Metro packager script
chrisnojima
force-pushed
the
nojima/HOTPOT-packaging-speed
branch
from
October 15, 2026 15:57
24ecdff to
2fc5bbd
Compare
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.
What
Makes the release builds faster. Stacked on #29761.
-a.prerelease/build_keybase.sh,build_kbfs.sh,build_updater.shandwindows/build_prerelease.cmdno longer force a full rebuild, standard library included.kb_guard_go_cacheinlib.shrunsgo clean -cacheon macOS when the SDK version or build, the clang version, orMACOSX_DEPLOYMENT_TARGETchanges.kb_prune_yarn_cacherunsyarn cache cleanonly when the volume holding the cache has less thanKB_MIN_FREE_GBfree (default 30), and logs the free space either way.node_modules:kb_yarn_moduleskeeps it and wipes it only when the stamp changes. The stamp coversyarn.lock,package.json, the patch names and contents, and the Node and yarn versions. It's deleted before each install, so a failed install is never reused.yarn modules, so postinstall,patch-packageand the rnmodules sync still happen.node_modules/*/android/.cxxCMake caches.CLEAN_CACHES=1forces a from-scratch build. When the bot sets it,kb_prune_yarn_cachealways runsyarn cache clean,kb_yarn_modulesalways deletesnode_modules, andkb_guard_go_cachealways runsgo clean -cache. The next build without the flag goes back to reusing the caches.--clean(keybot: --clean on build commands clears the build caches slackbot#118).build_prerelease.cmddoesn't use these helpers.manage_react_native_packager.shis deleted, and nothing else in this repo or keybase/slackbot called it.shared/android/app/build.gradle:20-39leavesdebuggableVariantsat its default ofdebuganddebugOptimized, soreleasebundles. The script runspublishReleaseBundle.Keybase.xcscheme:113-114).react-native-xcode.shskips bundling only for Debug, and the bundle phase is atproject.pbxproj:568-587.shared/react-native/packageAndBuild.shand theyarn rn:start:legacyscript. Their only caller was the packager script, and the JenkinsShellcheckstage and the README no longer list them.Building the two macOS architectures in parallel (4.4 in the plan) is left out.
Tested locally
Stub tests with a fake
yarnonPATH. The real cache wasn't touched.kb_prune_yarn_cachekb_yarn_modulesnode_modulesCLEAN_CACHES=1kb_guard_go_cache(scratchGOCACHE)The test build must confirm
keybase version -Sandkbfs -versionare correct.expo startprocess is left behind.shared/patches, the next build wipesnode_modulesandpatch-packageapplies cleanly.build_prerelease.cmdbuilds without-a.