Skip to content

Consolidate all bridged engine wrappers into a single wrapper and macro. - #7464

Merged
mhammond merged 1 commit into
mozilla:mainfrom
mhammond:push-pvklpqwlmxyv
Jul 8, 2026
Merged

Consolidate all bridged engine wrappers into a single wrapper and macro.#7464
mhammond merged 1 commit into
mozilla:mainfrom
mhammond:push-pvklpqwlmxyv

Conversation

@mhammond

@mhammond mhammond commented Jul 7, 2026

Copy link
Copy Markdown
Member

Seeing #7439 fly past reminded me that I was intending to try and remove the BridgedEngine entirely - this doesn't quite achieve that, but does get closer.

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.

Seeing mozilla#7439 fly past reminded me that I was intending to try and remove the
BridgedEngine entirely - this doesn't quite achieve that, but does get closer.
@mhammond
mhammond requested review from FlyingBaum, bendk and jo July 7, 2026 01:21

@jo jo 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.

Thanks a lot, that's really cool!

What would we need to do to get rid of the $guid type parameter? Do you have any idea why we don't use a sync_guid::Guid for logins as well? Is it because we need to expose it, and UniFFI does not support a sequence<Guid> thing yet?

@bendk bendk 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.

The changes look good to me. I still don't totally understand the bridged engine code, but AFAICT this macro code is exactly the same as before and it makes it easier to add a new bridged engine.

@mhammond

mhammond commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

Do you have any idea why we don't use a sync_guid::Guid for logins as well? Is it because we need to expose it, and UniFFI does not support a sequence thing yet?

IIRC, it predates the guid type. I think uniffi would handle it fine - like places, it would be a "custom type". OTOH though, I'm a little ambivalent about that type, in that it doesn't really add much value - there's no validation that it is shaped like a guid and we have Into/From to move between strings and guids. It is kinda nice as a kind of documentation though, but could also be viewed as extra complexity without much value.

(I can't argue with the fact that we are inconsistent with its usage is quite smelly though, so maybe moving logins to guid would make sense - it would be entirely transparent to foreign code as there it really is just a string)

@mhammond
mhammond added this pull request to the merge queue Jul 8, 2026
Merged via the queue into mozilla:main with commit 73bf321 Jul 8, 2026
14 checks passed
@mhammond
mhammond deleted the push-pvklpqwlmxyv branch July 8, 2026 02:21
jonesetc pushed a commit to jonesetc/application-services that referenced this pull request Aug 12, 2026
…ro. (mozilla#7464)

Seeing mozilla#7439 fly past reminded me that I was intending to try and remove the
BridgedEngine entirely - this doesn't quite achieve that, but does get closer.
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.

3 participants