Skip to content

Bug 2056071 - remove BridgedEngine, app-services side. - #7483

Open
mhammond wants to merge 1 commit into
mainfrom
remove-bridged-engine
Open

Bug 2056071 - remove BridgedEngine, app-services side.#7483
mhammond wants to merge 1 commit into
mainfrom
remove-bridged-engine

Conversation

@mhammond

@mhammond mhammond commented Jul 19, 2026

Copy link
Copy Markdown
Member

Removes lots of code and combined desktop and mobile syncing significantly. Tagging Bastian too, sharing the love 😆 ❤️

This uniffis (ha) the desktop and mobile sync engine implementations. Desktop still uses the macro generated "bridge", and that's a duck-type JS model - which all of desktop sync already is so, yeah.

Breaking change, will need to land https://phabricator.services.mozilla.com/D312903 and vendor this.

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.

@mhammond
mhammond requested review from bendk, gruberb and jo July 19, 2026 13:43

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

Looks great to me, I love seeing all the deleted lines.

// This is what UniFFI exposes; it does nothing other than delegate to
// the shared `BridgedEngineWrapper`. See
// services/interfaces/mozIBridgedSyncEngine.idl for the Desktop contract.
// the shared `BridgedEngineWrapper`, which adapts our `SyncEngine`.

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.

What's stopping us from removing this macro and the various [Component]BridgedEngine interfaces and replacing them with a single thing (maybe a trait interface that's defined in sync15)? The differences I can see are the GUID handling and the error type, which don't seem that big? I'm not suggesting you do anything different in this PR, I'm just wondering where we are in the larger process.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most recent version changes the guid handling too. Not entirely sure what you mean otherwise though - SyncEngine already is a trait in sync15, and bridged engine was a trait, but this is trying to roll them up so that only 1 engine need be implemented. But I'm totally up for future improvements!

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.

I think I was wondering if we could have a sync15::BridgedEngine trait and a blanket impl for everything that implements SyncEngine. I'm not sure that's better than the this PR, but doing away with the macro seems good to me.

Comment thread components/sync15/src/engine/sync_engine.rs Outdated

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

Looks good to me

@mhammond
mhammond force-pushed the remove-bridged-engine branch from 3e70c1f to d4dcbb6 Compare July 21, 2026 06:29
@mhammond
mhammond force-pushed the remove-bridged-engine branch 3 times, most recently from 72c99b5 to f5cbd89 Compare August 14, 2026 06:15
@mhammond

Copy link
Copy Markdown
Member Author

hey @DimiDL, this now also needed to touch addresses - I think it looks fine but want your review and also serves as a heads-up that I'm looking into landing this.

This uniffis (ha) the desktop and mobile sync engine implementations.
Desktop still uses the macro generated "bridge", and that's a duck-type JS
model - which all of desktop sync already is so, yeah.

Breaking change, will need to land phabricator/m-c's side of bug 2056071,
which will have its own patch and also vendor this.
@mhammond
mhammond force-pushed the remove-bridged-engine branch from f5cbd89 to bc0ec3f Compare August 14, 2026 12:06
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