Skip to content

fix(ios): avoid shared pointer Bool conversion in generated Swift bridges - #1585

Merged
mrousavy merged 1 commit into
mainfrom
fix/xcode-shared-pointer-bool
Sep 5, 2026
Merged

fix(ios): avoid shared pointer Bool conversion in generated Swift bridges#1585
mrousavy merged 1 commit into
mainfrom
fix/xcode-shared-pointer-bool

Conversation

@mrousavy

@mrousavy mrousavy commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary

Replace the cached shared-pointer Bool conversion with a use_count() check in the Swift bridge generator, and regenerate the seven checked-in bridges. No API changes.

Current Xcode rejects Bool(fromCxx: cachedCxxPart) because the imported shared_ptr does not conform to CxxConvertibleToBool. This failed the unchanged iOS Release source in #1582: https://github.com/margelo/nitro/actions/runs/33857794566/job/100975015762

This is an independent prerequisite for the atomic stack: #1582 (example move), #1583 (benchmark app), #1584 (version guard). The correction was extracted from the earlier benchmark implementation so neither the move nor performance PR needs to contain it.

Validation

  • bun specs regenerated only the expected seven Swift bridges.
  • Nitrogen TypeScript and ESLint pass; git diff --check passes.
  • These same generated changes compile in a local Xcode 26.6 Release simulator build; its standalone benchmark app completed all 40 cases successfully.
  • Fresh CI will validate the existing example independently.

@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nitro-docs Ready Ready Preview Sep 5, 2026 11:48am UTC

Request Review

@mrousavy
mrousavy force-pushed the fix/xcode-shared-pointer-bool branch from 4a0cbf9 to dabcf7c Compare September 5, 2026 11:47
@mrousavy
mrousavy merged commit f8549fc into main Sep 5, 2026
7 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant