Skip to content

merino/relevancy/suggest: Refactorings for uniffi_parse_rs#7419

Open
bendk wants to merge 1 commit into
mozilla:mainfrom
bendk:bdk/push-xvwouzxzxury
Open

merino/relevancy/suggest: Refactorings for uniffi_parse_rs#7419
bendk wants to merge 1 commit into
mozilla:mainfrom
bendk:bdk/push-xvwouzxzxury

Conversation

@bendk

@bendk bendk commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

I'm working on a new UniFFI parser
(mozilla/uniffi-rs#2841) and it currently has a couple extra requirements for types used in exported functions:

  • The types are publicly available from other crates.
  • The name matches the one used in the custom_type! macro.
  • Macro expansion is not supported, the types need to be written out by hand.

I could maybe rework the parser to avoid these requirements, but the first two the changes feel like improvements to me. Not being able to use macros for UniFFIed types is worse but I don't think it will affect us all that much in practice. Please push back if you don't think so.

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

I'm working on a new UniFFI parser
(mozilla/uniffi-rs#2841) and it currently has a
couple extra requirements for types used in exported functions:

 * The types are publicly available from other crates.
 * The name matches the one used in the `custom_type!` macro.
 * Macro expansion is not supported, the types need to be written out by
   hand.

I could maybe rework the parser to avoid these requirements, but the
first two the changes feel like improvements to me.  Not being able to
use macros for UniFFIed types is worse but I don't think it will affect
us all that much in practice. Please push back if you don't think so.
@bendk bendk requested a review from a team June 15, 2026 18:41
@bendk

bendk commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

I'm going to be opening several of these issues. I feel like this one is the most controversial since the "no macros" rule is a real limitation. Please tell me if you think that's going to negatively affect you too badly.

@bendk bendk assigned bendk and unassigned bendk Jun 15, 2026
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