Skip to content

Decouple selective sync - #4719

Open
tomasMizera wants to merge 5 commits into
feature/sync-v2from
feature/sync-v2-decouple-selective-sync
Open

tomasMizera wants to merge 5 commits into
feature/sync-v2from
feature/sync-v2-decouple-selective-sync

Conversation

@tomasMizera

@tomasMizera tomasMizera commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Removes old spaghetti code for selective sync, including the logic that suppressed it via setSupportsSelectiveSync on MerginApi.

The supportsSelectiveSync flag 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 update mergin-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, hasLocalChanges no 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

@tomasMizera tomasMizera mentioned this pull request Sep 25, 2026
2 of 14 tasks
@tomasMizera
tomasMizera marked this pull request as ready for review September 25, 2026 22:55
@github-actions

Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build ❌ Build failed or not found. #7338
linux Build ❌ Build failed or not found. #7364
win64 Build 📬 Mergin Maps 65401 win64 Expires: 24/12/2026 #6540
Android Build ❌ Build failed or not found. #8650
iOS Build 📬 Build number: 26.09.959011 #9590

@tomasMizera
tomasMizera added this pull request to stack #4730 September 29, 2026 20:54
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.

1 participant