Skip to content

Adds an --incremental (-i) option to the xcsync watch command.#241

Open
Prochy wants to merge 3 commits intodotnet:mainfrom
Prochy:dev/story/watch-incremental-option
Open

Adds an --incremental (-i) option to the xcsync watch command.#241
Prochy wants to merge 3 commits intodotnet:mainfrom
Prochy:dev/story/watch-incremental-option

Conversation

@Prochy
Copy link
Copy Markdown

@Prochy Prochy commented Apr 15, 2026

Summary

Adds an --incremental (-i) option to the xcsync watch command.

When enabled, watch mode syncs only the files related to the changed source/Xcode file instead of re-running a full project sync on every change.

Why

Today, xcsync watch performs a full synchronization whenever a file changes. That is more work than necessary for small edits and makes watch mode slower and noisier during normal development.

This change introduces an incremental mode so watch can react more efficiently to single-file changes while preserving the existing full-sync behavior by default.

The xsync was unusable in my environment because if I change something in XCode, it takes around 1 minute to propagate the change to C# codebase. I have there around 30 items in XCode. With incremental option, it's within a few seconds.

What changed

Added --incremental / -i to xcsync watch
Threaded the option through watch execution into change handling
Updated change messages to carry whether the sync should be incremental
Passed the changed file path into sync so only affected types/files are processed
Kept default behavior unchanged when the option is not specified
Result
With xcsync watch --incremental, edits in watch mode trigger a targeted sync for the changed file instead of syncing the entire project.

Microsoft Reviewers: Open in CodeFlow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants