Skip to content

core: clean up comments, docs, dead code and tests - #237

Merged
zimbatm merged 5 commits into
mainfrom
cleanup/core
Oct 24, 2026
Merged

zimbatm merged 5 commits into
mainfrom
cleanup/core

Conversation

@zimbatm

@zimbatm zimbatm commented Oct 23, 2026

Copy link
Copy Markdown
Member

Cleanup of src/eval, src/runtime, src/compile, src/syntax, src/parallel, src/trace, src/corepkgs and src/builtins.

  • Comments: 19 removed, among them the trailing // parallel tags after fanout_* calls. Comments that name the mechanism stay.
  • Docs: 12 doc comments in plain words, mostly the ThunkObj and MapDesc docs and the module docs of compile/cache.rs and builtins/store_hooks.rs.
  • Dead code: 11 pub use re-exports in src/runtime/mod.rs that nothing uses. The types stay at iets::runtime::value::*. An outside library user of the old paths must change the import; docs/reference/library.md says the API can change.
  • Tests: no test removed (1182 stay). eval/tests.rs and syntax/tests.rs share one helper each for evaluate-and-print and for parse-must-fail.
  • A second review restored the soundness claim in the src/runtime/arena.rs module doc.

src/corepkgs/*.nix is unchanged, because it is a copy of upstream Nix. fmt, clippy, ast-grep and the full test suite pass.

Remove the `// parallel` tags after `parallel::fanout_*` calls: the
call names the module. Remove four comments that repeat the line or
the signature below them.

Assisted-by: Claude Code (claude-opus-5)
Change-Id: I01ca1b7d182bfab4aef1287664d8b89fda9b1220
Split long doc sentences, use the active voice and turn two run-on
lists into bullet lists: the thunk layout, the map descriptor, the IR
cache, the IR, the arena, the word bits, store_hooks, fetchTree, the
path primops, the watch selection, the derivation position and
EvalConfig::is_pure. Every fact, limit and pointer stays.

Assisted-by: Claude Code (claude-opus-5)
Change-Id: I92c1b76091f39e801d124d952c54b3f0aec568cc
Drop eleven `runtime` re-exports that nothing uses: AttrIter, FloatObj,
IntObj, LambdaObj, MapDesc, PathObj, PrimOpAppObj, PrimOpObj,
ThunkApp2Obj, ThunkAppObj and UnionTail. With the module made
crate-private, the compiler reports them as unused imports, and no
file under src/, tests/, fuzz/, bench/, examples/ or docs/ names them
through `runtime::`. The types stay in `runtime::value`.

Assisted-by: Claude Code (claude-opus-5)
Change-Id: I32714288e1f107df460b9e7dcbfb5510584ffd61
No test is removed. The eval tests had three copies of the
evaluate-force-print body (eval_str, eval_pure and the closure in
nix_eq_forces_what_the_shortcut_skips); they now share eval_with. The
syntax tests had four copies of the "parse must fail" block; they now
share parse_error, which parse_err also uses.

Assisted-by: Claude Code (claude-opus-5)
Change-Id: I40c678d2cac117ddcf83c5fc15b57d1bc0067d6d
- runtime/arena.rs: say again that graph sharing between cells is sound

Assisted-by: Claude Code (claude-opus-5)
Change-Id: If56bbdcbf8bfd772d1d8a8b92cfc0e2768c861b9
@zimbatm
zimbatm added this pull request to the merge queue Oct 24, 2026
Merged via the queue into main with commit b13ee32 Oct 24, 2026
5 checks passed
@zimbatm
zimbatm deleted the cleanup/core branch October 24, 2026 02:02
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