Skip to content

fix(ios): keep KeepAwakeBridge core JavaScriptCore-free (unblocks full-Bun device build) - #12016

Merged
lalalune merged 2 commits into
developfrom
shaw/practical-rubin-10cf36
Jul 3, 2026
Merged

fix(ios): keep KeepAwakeBridge core JavaScriptCore-free (unblocks full-Bun device build)#12016
lalalune merged 2 commits into
developfrom
shaw/practical-rubin-10cf36

Conversation

@lalalune

@lalalune lalalune commented Jul 3, 2026

Copy link
Copy Markdown
Member

The iOS device build (ELIZA_IOS_FULL_BUN_ENGINE=1) fails to compile:

KeepAwakeBridge.swift:34:13: error: value of type 'JSContext' has no member 'installBridgeFunction'
** BUILD FAILED **  (xcodebuild exited with code 65)

#11897 split the JSContext keep_awake_set installer into KeepAwakeBridge+JSContext.swift specifically so the core KeepAwakeBridge type stays JavaScriptCore-free and compiles into the full-Bun engine build — whose podspec (ElizaosCapacitorBunRuntime.podspec, include_full_bun_engine branch) omits JavaScriptCore and lists only a minimal source set (no JSContextHelpers.swift, no +JSContext.swift). But the base KeepAwakeBridge.swift still carried a leftover install(into ctx: JSContext) (+ import JavaScriptCore) that calls ctx.installBridgeFunction — the extension defined in the excluded JSContextHelpers.swift. So the full-Bun build can't resolve it (and the compat build would hit a redeclaration vs the +JSContext extension).

Removed the duplicate installer + import from the core file. The JSContext install now lives solely in KeepAwakeBridge+JSContext.swift (compat build); the full-Bun path drives the same ref-counted holder via setEnabled from FullBunEngineHost.

Verified by re-running ios:device:deploy to a physical iPhone (build proceeds past the Swift compile). Native/on-device evidence attached once the device install completes.

🤖 Generated with Claude Code

Shaw and others added 2 commits July 3, 2026 14:57
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ine build)

#11897 split the JSContext `keep_awake_set` installer into
`KeepAwakeBridge+JSContext.swift` so the core `KeepAwakeBridge` type stays
JavaScriptCore-free and compiles into the full-Bun engine build (whose podspec
omits JavaScriptCore + JSContextHelpers). But the base `KeepAwakeBridge.swift`
still carried a leftover `install(into ctx: JSContext)` (+ `import
JavaScriptCore`) calling `ctx.installBridgeFunction` — which is defined in
`JSContextHelpers.swift`, NOT in the full-Bun source set. Result: the device
build (ELIZA_IOS_FULL_BUN_ENGINE=1) failed with
`value of type 'JSContext' has no member 'installBridgeFunction'`
(and the compat build would hit a redeclaration vs the +JSContext extension).

Remove the duplicate installer + import from the core file. The JSContext
install lives solely in `KeepAwakeBridge+JSContext.swift` (compat build); the
full-Bun path drives the same holder via `setEnabled` from FullBunEngineHost.

Unblocks `ios:device:deploy`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6e6306e2-2039-460c-8c7c-d34b82c056e8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch shaw/practical-rubin-10cf36

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@lalalune
lalalune merged commit baabc19 into develop Jul 3, 2026
45 of 73 checks passed
@lalalune
lalalune deleted the shaw/practical-rubin-10cf36 branch July 3, 2026 19:05
lalalune added a commit that referenced this pull request Jul 3, 2026
Restore unrelated generated/assets/training files that landed in #12016 while keeping the intended KeepAwakeBridge Swift fix.\n\nValidation:\n- git diff --check\n- xcrun --sdk iphonesimulator swiftc -typecheck -target arm64-apple-ios15.0-simulator plugins/plugin-native-bun-runtime/ios/Sources/ElizaBunRuntimePlugin/bridge/KeepAwakeBridge.swift\n- xcrun --sdk iphonesimulator swiftc -typecheck -target arm64-apple-ios15.0-simulator plugins/plugin-native-bun-runtime/ios/Sources/ElizaBunRuntimePlugin/JSContextHelpers.swift plugins/plugin-native-bun-runtime/ios/Sources/ElizaBunRuntimePlugin/bridge/KeepAwakeBridge.swift plugins/plugin-native-bun-runtime/ios/Sources/ElizaBunRuntimePlugin/bridge/KeepAwakeBridge+JSContext.swift\n- Restored files match pre-#12016 tree c9803c4
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

LifeOps Benchmark — eliza

Run ID: lifeops-eliza-28678936717

LifeOps Benchmark

Model: gemma-4-31b
Judge: claude-opus-4-7
Scenarios: 25
pass@1: 0.000
pass@k: 0.000
Total cost: $0.0000

Full artifacts: see the lifeops-run-eliza-28678936717 upload on this run.

@claude

claude Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant