Skip to content

refactor: remove dead SparseWriter decorator#6856

Merged
oferchen merged 3 commits into
masterfrom
refactor/dead-sparse-writer
Jul 22, 2026
Merged

refactor: remove dead SparseWriter decorator#6856
oferchen merged 3 commits into
masterfrom
refactor/dead-sparse-writer

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • The engine crate exposed a public SparseWriter<W> decorator (wrapping any Write + Seek writer with its own zero-run scanning) that had no production caller. The live sparse write path goes through SparseWriteState::flush()/finish() (sparse/state.rs), reached from local_copy/executor/context_impl/transfer.rs and delta_transfer.rs.
  • SparseWriter was reachable only via re-export chains (sparse/mod.rs -> file/mod.rs -> local_copy/mod.rs -> executor/mod.rs -> lib.rs) and its own dedicated tests that exercised the dead type itself, not the live path.
  • Removed the type, its ZeroScanStrategy/SparseWriteStats companions, the now-orphaned pub use chains, and the tests that covered only the dead decorator. SparseWriteState and its tests are untouched.

Test plan

  • cargo fmt -p engine -- --check
  • cargo clippy -p engine --all-targets --all-features --no-deps -- -D warnings
  • cargo nextest run -p engine --all-features -E 'test(sparse)' (151 passed)
  • cargo clippy -p engine -p transfer -p cli --no-deps -- -D warnings (no downstream breakage from the removed public API)

oferchen added 2 commits July 22, 2026 17:58
The engine crate exposed a public SparseWriter<W> decorator wrapping any
Write + Seek writer with its own zero-run scanning. It had no production
caller: the live sparse write path goes through SparseWriteState::flush()/
finish() (state.rs), reached from context_impl/transfer.rs and
delta_transfer.rs. SparseWriter was only referenced by its own tests and
by re-export chains surfacing it publicly.

Remove the type, its ZeroScanStrategy/SparseWriteStats companions, and
the tests that exercised only the dead decorator. The live SparseWriteState
path and its tests are untouched.
Match rustfmt's line-wrap width for the local_copy re-export list in lib.rs.
@oferchen
oferchen merged commit 028616d into master Jul 22, 2026
62 checks passed
@oferchen
oferchen deleted the refactor/dead-sparse-writer branch July 22, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant