build: WebKit bump for bytecode-cache source-string fix#29506
Draft
dylan-conway wants to merge 5 commits into
Draft
build: WebKit bump for bytecode-cache source-string fix#29506dylan-conway wants to merge 5 commits into
dylan-conway wants to merge 5 commits into
Conversation
Pulls in the CachedTypes change that stops encoding the bundled source text into CachedSourceCodeKey. Under BUN_JSC_ADDITIONS the SourceCodeKey::operator== string comparison is already skipped, so the encoded source bytes were never read — but they were still written into every .jsc blob and heap-allocated as an AtomStringImpl during decodeCodeBlockImpl, then pinned by a Decoder finalizer for the lifetime of every UnlinkedFunctionExecutable with a lazy body. Preview pin so CI can run the full test suite against the WebKit change before it merges; will be replaced with the real commit hash once #186 lands.
Collaborator
|
Updated 10:27 PM PT - Apr 20th, 2026
❌ @dylan-conway, your commit e10b48d has 4 failures in
🧪 To try this PR locally: bunx bun-pr 29506That installs a local version of the PR into your bun-29506 --bun |
Contributor
|
Found 1 issue this PR may fix:
🤖 Generated with Claude Code |
The first test asserts on stdout before stderr/exitCode, so when the
child fails the diff shows only stdout="" with no diagnostic. Collapse
the three assertions into one toEqual on {stdout, stderr, exitCode,
signalCode} so a CI failure prints what the child actually wrote.
Behaviour-only test change; the spawn and inputs are unchanged.
`bun run build:ci` (profile=ci-release, mode=full, ci=true) was failing with -Wundefined-var-template on JSGenericTypedArrayView::s_info because the PCH was being skipped. The PCH wrapper applies #pragma clang system_header to JSC includes, which is the only thing suppressing that warning (template static defined in JSC's .cpp, linker resolves). The previous predicate (`!cfg.ci || cfg.mode === "cpp-only"`) only worked because real CI uses the split cpp-only/zig-only/link-only profiles, where cpp-only kept PCH on and the others don't compile C++. The full+ci combination — which is what build:ci and `--ci=on` produce locally — fell through to no PCH. Gate on mode instead: PCH for "full" and "cpp-only", off for Windows.
Stops encoding source text into CachedSourceCodeKey under BUN_JSC_ADDITIONS — the decoded key only feeds SourceCodeKey::operator== which already skips the byte comparison there. Removes a per-chunk ~source_size AtomStringImpl heap allocation at decode and the matching bytes from each .jsc on disk.
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.
Summary
Pins WebKit to the preview build of oven-sh/WebKit#186 so CI can run against it.
That PR stops
CachedStringSourceProviderfrom encoding the bundled source text into the bytecode cache and from heap-allocating a copy of it during decode. UnderBUN_JSC_ADDITIONS,SourceCodeKey::operator==already skips the source-bytes comparison, so the encoded copy was never read — but it was still:.jscblob (≈15-18% of the file)AtomStringImplduringdecodeCodeBlockImplDecoderfinalizer for the lifetime of everyUnlinkedFunctionExecutablewith a lazy body — i.e. effectively process-lifetime, since cold functions in the bundle never drop theirm_decoderrefThe source bytes that runtime features (
Function.prototype.toString,Error.stack, lazy-reparse) read are unaffected: they come fromScriptExecutable::m_source→ the runtimeZigSourceProvider, which is a separate object set beforedecodeCodeBlockruns.Cross-version
.jscfiles self-invalidate viam_cacheVersion = hash(BUN_WEBKIT_VERSION), which changes with this pin.Draft: the version string is a preview tag; will be replaced with the merged commit hash once oven-sh/WebKit#186 lands.
Test plan
test/bundler/bundler_compile.test.ts54/54 (release, local-WebKit)test/bundler/bundler_banner.test.ts11/11test/bundler/bun-build-api.test.ts -t bytecode1/1Function.prototype.toString,Error.stack, nested-lazy-decode, async,eval,new Functionall pass with[Disk Cache] Cache hit.jsc(system bun) + new decoder →[Disk Cache] Cache miss, falls back to parse, output correct