Decouple selective sync - #4719
Open
tomasMizera wants to merge 5 commits into
Open
tomasMizera wants to merge 5 commits into
tomasMizera wants to merge 5 commits into
Conversation
📦 Build Artifacts Ready
|
tomasMizera
added this pull request to stack #4730
September 29, 2026 20:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes old spaghetti code for selective sync, including the logic that suppressed it via
setSupportsSelectiveSyncon MerginApi.The
supportsSelectiveSyncflag is gone, replaced by a per-project file flag indicating whether selective sync should be used. This simplifies testing: a test client can mimic server logic and updatemergin-config.json, which is normally forbidden on mobile.The flag lives at
.mergin/selective-sync.ignored, an empty file. If present, selective sync is ignored for that project. It's written on first download, then read automatically - MerginApi no longer needs to be told whether to ignore selective sync.As a side effect,
hasLocalChangesno longer depends on MerginApi's internal state; it now reads the setup from the file directly.Managed to make tests compilable, selective sync autotests are nearly passing. I will fix those first before merging the PR.
Fixes one of the points in #3959