Skip to content

quest(m1): record the uniffi rename probe and upstream issue - #5473

Merged
kixelated merged 1 commit into
mainfrom
quest/m1/ffi-shape-uniffi-3026
Oct 13, 2026
Merged

kixelated merged 1 commit into
mainfrom
quest/m1/ffi-shape-uniffi-3026

Conversation

@kixelated

@kixelated kixelated commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #5460, which merged with the no-go. This tested the maintainer's rename idea and filed the upstream issue. The verdict stays no-go until mozilla/uniffi-rs#3026 is resolved.

Rename probe

Same spike harness as #5460: crates net (namespace moq) and media linked into one libmoq_ffi. media's colliding types got distinct Rust names (MediaGroupConsumer, MediaFrame) so the bare-name TypeUniverse check passes. A per-language rename then mapped them back to GroupConsumer and Frame. UniFFI 0.32.2 has [bindings.{kotlin,swift,python}.rename] built in. The Go, Dart, and C++ forks have no rename option, so I patched each one locally (not pushed) to apply [bindings.<lang>.rename] through uniffi_bindgen::interface::rename, the same way the Kotlin backend does.

Generator Renamed type and net type coexist How the external type is referenced Compiles and runs
Python (built in) yes module-qualified (moq.GroupConsumer) yes, the test passes
Go (fork, patched) yes package-qualified (moq.GroupConsumer) yes after fixing 2 lines by hand: uniffi's rename visitor skips the constructor's return type (*MediaGroupConsumer)
Kotlin (built in) no import uniffi.moq.GroupConsumer shadows the local class no: media's own converters resolve to the net types
Swift (built in) no not imported; one-module layout no: 'GroupConsumer' is ambiguous in one module. With one module per crate (plus import moq), the local type shadows the import (value type 'Frame' cannot have a stored property that recursively contains it)
Dart (fork, patched) no unqualified import "moq.dart", so the local type shadows it generates and compiles, but media.GroupConsumer's constructor ends up typed against itself, so a consumer can't pass a net GroupConsumer
C++ (fork, patched) no sorts definitions by bare name renaming the record panics (Cyclic dependency detected). Renaming only the object emits its converter into the net namespace (redefinition of moq::uniffi::FfiConverterGroupConsumer)
Generated C (fork) n/a n/a the backend still refuses external types

Only the backends that refer to external types through their module (Python, Go) survive the rename. Fixing the rest means changing how each backend references external types, which is the upstream fix.

Upstream

I found no existing issue: the closest are mozilla/uniffi-rs#2732 (same crate, closed), mozilla/uniffi-rs#2153 (Swift/Python visibility), and mozilla/uniffi-rs#2985. So I filed mozilla/uniffi-rs#3026. It has a two-crate repro, the exact conflicting types error from TypeUniverse::add_known_type, a fix sketch (key by (module_path, name) and qualify cross-crate references per backend), and the Python silent drop. That drop looks fixed on uniffi main by mozilla/uniffi-rs#2985, which no 0.32.x release includes.

Change

quest/m1/ffi-shape/README.md records the rename result and links mozilla/uniffi-rs#3026 as the condition for revisiting the split.

Decisions

Public API and wire impact

None. Quest files only.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

Distinct Rust names renamed back per language only work in Python and Go. Track mozilla/uniffi-rs#3026 as the condition to revisit the split.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review October 13, 2026 23:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T23:21:00.287659Z ea704e7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 45 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e1c9b62e-29b3-4e85-8da8-7a6dfa0a6d66
📥 Commits

Reviewing files that changed from the base of the PR and between 90776f9 and ea704e7.

📒 Files selected for processing: 1
  • quest/m1/ffi-shape/README.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary: this records the rename probe and links mozilla/uniffi-rs#3026 from quest/m1/ffi-shape/README.md. Quest files only, with no API or wire impact.

Decisions, confirmed by the maintainer:

CI is green (Check, Quest, Test). Codex gave a thumbs-up on head ea704e7. CodeRabbit didn't review because of its rate limit.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit e6488df Oct 13, 2026
4 checks passed
@kixelated
kixelated deleted the quest/m1/ffi-shape-uniffi-3026 branch October 13, 2026 23:50
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