chore: bump embedded Bun to 1.4.2 - #44946
AlexanderWillner wants to merge 2 commits into
Conversation
|
Independent confirmation for this change: I rebuilt the official source with Bun 1.4.0 on Windows 11 ARM64 (native |
|
I measured the default TUI as an independent check of the runtime bump. Environment: current
Launch order was counterbalanced AB/BA. Every pair favored 1.4.0; the median reduction was 154 MB / 21.8%. I also checked this PR's head ( Scope caveat: this measures one clean macOS idle point, not peak memory, long-session growth, active workloads, or other platforms. |
|
+1 on this PR — and one more reason to prioritize it: it fixes the TUI on native Windows ARM64. The (tracked in #19130 and #38520 — both still open) Bun 1.4 rewrote So this bump isn't just a performance win — it's what makes the Windows ARM64 build usable at all. 🙏 |
4fd7725 to
00fbde8
Compare
00fbde8 to
67a2ed9
Compare
Follow-up patch release to the Rust rewrite; keep the pin in sync with the locally verified runtime.
|
why is this taking so long |
|
Additional Linux evidence for Bun 1.4.2: an earlier controlled comparison on our custom OpenCode baseline measured CPU usage falling from roughly 62–68% to 5–6%. The runtime CPU benefit is attributable to the Bun GC timer fix (oven-sh/bun#35356), not the filesystem-cycle fix below. The operator now reports a few days of normal server and TUI use with excellent CPU usage and no noticed issues; this is user-reported soak on a custom build, not pristine-upstream or cross-platform validation. We also found a compiled first-prompt failure with Bun 1.4.2. #48397 breaks the filesystem import cycle and includes a clean-upstream Linux compiled regression; it is now ready for review as a companion to this runtime upgrade. |
|
+1 from our side, with a matching crash. We run 1.18.30 (embedded Bun 1.3.14) on WSL2: Systemd recorded Two things that might help triage. We only see this under Caveat: our Sep 13 trap lines had rotated out of the journal, so the address match rests on one crash, and we haven't disassembled the binary to confirm the site. #40812 shows the same pattern on |
Bun 1.4.0 still hits segfaults in the bun:ffi path OpenTUI renders through; a long-lived TUI resumed after sleep is the reported trigger (e.g. Kilo-Org/kilocode#13954, anomalyco/opencode#47037). 1.4.2 carries the fixes for that FFI-crash family, and OpenCode bumped its embedded Bun to 1.4.2 for the same reason (anomalyco/opencode#44946). Update the runtime shipped with the npm package (BUNDLED_BUN_VERSION), the engines floor, and the version floor stated in the docs, then regenerate the embedded docs. The logs.md note about a 1.4.0 compiled-binary worker limitation is left as-is; it describes that specific behavior, not a minimum version. Note: the matching bun-version pins in .github/workflows/ci.yml and release.yml still need bumping to 1.4.2; that change requires the GitHub `workflow` scope and could not be pushed from this session. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GvJemP2DWDEHzLSv8qbdaG
Bun 1.4.0 still hits segfaults in the bun:ffi path OpenTUI renders through; a long-lived TUI resumed after sleep is the reported trigger (e.g. Kilo-Org/kilocode#13954, anomalyco/opencode#47037). 1.4.2 carries the fixes for that FFI-crash family, and OpenCode bumped its embedded Bun to 1.4.2 for the same reason (anomalyco/opencode#44946). Update the runtime shipped with the npm package (BUNDLED_BUN_VERSION), the engines floor, and the version floor stated in the docs, then regenerate the embedded docs. The logs.md note about a 1.4.0 compiled-binary worker limitation is left as-is; it describes that specific behavior, not a minimum version. Note: the matching bun-version pins in .github/workflows/ci.yml and release.yml still need bumping to 1.4.2; that change requires the GitHub `workflow` scope and could not be pushed from this session. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GvJemP2DWDEHzLSv8qbdaG
|
Adding a Windows x64 (non-ARM) FFI-crash data point to the smoke-test gap called out in #44945 — that request specifically flags "Windows needs a smoke test: the fix referenced from #44513 is not visible in the 1.4.0 release notes." I can help close that. The crash this bump fixes (evidence)On Crash report: https://bun.report/1.3.14/ea10d9b296m7Gz/339/D_is33sB_____A20gBkmt144B Env: Windows 11 x64, CPU What I can do for the smoke testI have a reliable repro of the pre-fix crash on this machine, which is the piece that makes a before/after comparison meaningful:
If it's useful, I'm happy to:
Just point me at the branch/tag to test (or confirm Independent of the FFI crash, this bump also looks worth it on the measured resource numbers alone (RSS / suite runtime) that @kvyb and @kernel-oops reported. |

Issue for this PR
Closes #44945
Type of change
What does this PR do?
Bumps the pinned packageManager from bun@1.3.14 to bun@1.4.1 (2026-09-04 follow-up to the 1.4 Rust rewrite). That field drives CI via .github/actions/setup-bun, and bun build --compile embeds the running runtime into release binaries — so this one line is the whole runtime upgrade.
Rebased onto current dev: the Bun 1.4 prerequisite fixes are already merged via #44944, so this PR is now a single one-line commit with no code changes.
How did you verify your code works?
Measured on darwin-arm64, same tree and build flags (
--single --skip-embed-web-ui --skip-install), one binary compiled per runtime, isolated data dirs for serve:--versionpeak RSS (median, n=5)servecold+idle RSSservecold start until listeningpackages/opencodesuite (3573 tests)packages/coresuite (1097 tests)Notes:
typecheckclean in both packages under 1.4.1.applies plugin shell environment) hangs in this sandbox under both 1.4.1 and 1.3.14, so it is a pre-existing environmental issue, not a 1.4 regression signal.Checklist