Skip to content

Remove dead members from Snapshot and SyncPlan - #121

Merged
in-jun merged 1 commit into
mainfrom
fix/snapshot
Jul 18, 2026
Merged

Remove dead members from Snapshot and SyncPlan#121
in-jun merged 1 commit into
mainfrom
fix/snapshot

Conversation

@in-jun

@in-jun in-jun commented Jul 18, 2026

Copy link
Copy Markdown
Owner

The core-sync models carry four public members with no call sites anywhere in the repo. A small, provable model surface is the point of core-sync, so these are worth dropping before someone reaches for one and introduces an inconsistent code path.

  • Snapshot.with/Snapshot.without: mutation helpers on an otherwise-immutable model; snapshots are always rebuilt in full via SnapshotBuilder, never mutated incrementally.
  • SyncPlan.hasConflicts and SyncPlan.EMPTY: unused; conflict reporting flows through the differently-named SyncResult.Success.hadConflicts. Removing EMPTY leaves an empty companion object, so that goes too.

Kept Snapshot.EMPTY/of/contains and SyncPlan.conflicts/localDeletionCount/remoteDeletionCount/action, which are all still referenced. core-sync compiles and its full test suite passes.

Fixes #73

@in-jun in-jun left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified against the current tree: a repo-wide search for .with(, .without(, hasConflicts, and SyncPlan.EMPTY (Kotlin sources plus build scripts) turns up only the declarations being removed here. Conflict reporting genuinely flows through the separately-named SyncResult.Success.hadConflicts, and every surviving .EMPTY reference in the tests resolves to Snapshot.EMPTY, which is retained. Dropping the now-empty SyncPlan companion object along with EMPTY is the right call.

Scope is tight — nothing beyond the four dead members — and it lands squarely on the stated goal of keeping the core-sync model surface small and provable. Looks good to merge.

@in-jun
in-jun merged commit 1b03be2 into main Jul 18, 2026
1 check passed
@in-jun
in-jun deleted the fix/snapshot branch July 18, 2026 16:10
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.

Remove dead Snapshot.with/without and SyncPlan.EMPTY/hasConflicts from core-sync models

1 participant