Skip to content

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

Draft
mrousavy wants to merge 1 commit into
mainfrom
fix/xcode-shared-pointer-bool
Draft

fix(ios): avoid shared pointer Bool conversion in generated Swift bridges#1585
mrousavy wants to merge 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.

1 Skipped Deployment
Project Deployment Actions Updated
nitro-docs Skipped Skipped Sep 4, 2026 9:37am UTC

Request Review

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