Skip to content

io: clean up comments, docs and dead code - #238

Merged
zimbatm merged 4 commits into
mainfrom
cleanup/io
Oct 24, 2026
Merged

zimbatm merged 4 commits into
mainfrom
cleanup/io

Conversation

@zimbatm

@zimbatm zimbatm commented Oct 23, 2026

Copy link
Copy Markdown
Member

Cleanup of src/fetch, src/source, src/store, src/treestore, src/remote, src/build, src/sys, nix/ and fuzz/src.

  • Comments that only restated code are removed, and padded doc comments are in plain words.
  • Dead code: build::executor::Places::{len, is_empty, iter} and source::Tree::{nar_hash, last_modified} have no callers.
  • A second review restored the read_exact_at doc in src/sys/fs.rs ("without moving the file's cursor"). On main it sat above the wrong function.

Needs a decision, not changed here: no production code calls Places::pick, Places::refused or Place::takes. But docs/reference/settings.md:238 says a derivation goes to the first place that accepts it. Either connect this routing or remove it and fix the docs.

fmt, clippy, ast-grep and the full test suite pass.

Drop a stray doc line left above sys::fs::remove_link, and three test
doc comments that only repeat the test name.

Assisted-by: Claude Code (claude-opus-5)
Change-Id: Ia6b23f5154de323d61d0a2d8ae6a737cd849f345
Fix two dead pointers: build::executor named docs/executors-proposal.md,
which main never had, and grpc::build named worker/build.rs, which is
gone. Move the parents note onto its own field, say why drv_path is
cfg(test), and split two run-on module docs into short sentences.

Assisted-by: Claude Code (claude-opus-5)
Change-Id: Ibe373023f6767b6842e29aa5a3ec4d069b360896
Places::len, is_empty and iter have no caller: api::build only calls
Places::get. source::Tree::nar_hash and last_modified have no caller
either. A probe that made every pub fn of the area pub(crate) got
"never used" from the compiler for each, and a grep of src, tests,
fuzz, bench and examples finds no use.

Assisted-by: Claude Code (claude-opus-5)
Change-Id: I5137c0d44f1c8348c8f75d0a457dee58862c05fc
- sys/fs.rs: put the read_exact_at doc back on read_exact_at; it says the
  cursor does not move, as write_all_at does.

Assisted-by: Claude Code (claude-opus-5)
Change-Id: I57723dba1c67adfbe3a9a7fa4387d02edc62041a
@zimbatm
zimbatm enabled auto-merge October 23, 2026 23:55
@zimbatm
zimbatm added this pull request to the merge queue Oct 24, 2026
Merged via the queue into main with commit e0ba430 Oct 24, 2026
5 checks passed
@zimbatm
zimbatm deleted the cleanup/io branch October 24, 2026 00:07
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