Closed Bug 1865157 Opened 2 years ago Closed 27 days ago

sync15_traits::Store::prepare_for_sync is an unfortunate hack to support the tabs engine

Categories

(Application Services :: Sync, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 2056071

People

(Reporter: markh, Unassigned)

Details

From github: https://github.com/mozilla/application-services/issues/2590.

It requires the sync15_traits crate to include a large amount of unnecessary API surface. It exists just to support the tabs engine's dependence on the clients engine, we should think of another way that allows us to avoid this. The main obvious way around this -- keep prepare_to_sync, but have it pass a JSON object instead -- seems just as unsatisfying.

The way we'd handle this in other languages is by having an extension to sync15_traits::Store that includes this, and conditionally downcast to it -- this doesn't work since you can't downcast from dyn Foo to dyn Bar even if trait Bar: Foo. At least, not without unsafe glue, which would probably require Bar and Foo to be defined together, defeating the point. Anyway, for now just filing an issue.

┆Issue is synchronized with this Jira Task
┆epic: Tabs improvements

Change performed by the Move to Bugzilla add-on.

Made better in 2056071

Status: NEW → RESOLVED
Closed: 27 days ago
Duplicate of bug: 2056071
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.