Skip to content

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

Open
mhammond wants to merge 2 commits into
mainfrom
remove-bridged-engine
Open

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

Conversation

@mhammond

Copy link
Copy Markdown
Member

Sorry for the size of this, but combined with the desktop side (which I'll get you all on too, again, sorry), it removes lots of code and combined desktop and mobile syncing significantly. Tagging Bastian too, sharing the love 😆 ❤️

🥂

This uniffi's (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.

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.

/// last-modified timestamps for collections are handled differently;
/// who does the `get_collection_request()` etc impacts the owner of the
/// timestamp.
/// Engines should do both or neither, longer term it should be absorbed.

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.

This is connected to last_sync, but it's also for reset_last_sync. What about changing it to double-slashes and adding a newline before the method? Alternatively, it could be reworded to be about last_sync with a note at the end that says something like "this also applies to "reset_last_sync".

@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 added 2 commits July 21, 2026 16:29
This uniffi's (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 3e70c1f to d4dcbb6 Compare July 21, 2026 06:29
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