Skip to content

frontend: clean up comments, docs, dead code and tests - #236

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

zimbatm merged 4 commits into
mainfrom
cleanup/frontend

Conversation

@zimbatm

@zimbatm zimbatm commented Oct 23, 2026

Copy link
Copy Markdown
Member

Cleanup of src/cli, src/api, src/jobs, src/flake, src/lint, src/devenv and the top-level src/*.rs files.

  • Comments: 3 removed that only restated code or test names.
  • Docs: 8 doc comments in plain words. The --iets-option VALUE text moved from read_builders to flag_value, which it describes.
  • Dead code: src/cli/search.rs had a private copy of the builtins.parseDrvName split, and src/api/installable.rs had another. Both now call builtins::strings::parse_drv_name_bytes. The rule is the same in all three copies.
  • Tests: float_formatting_is_never_empty merged into float_formatting_edge_cases. Its 11 values are now exact-value cases, so the test checks more than before.

No user-visible text changed. A second review found nothing to restore. fmt, clippy, ast-grep and the full test suite pass, also merged with the other three cleanup branches.

Three display tests carried a doc comment that only repeated the
test name.

Assisted-by: Claude Code (claude-opus-5)
Change-Id: I680e3c413d9f1240bea78d691ad156a15d6128a9
Move the doc of the --iets-option value parser from read_builders,
where it sat by mistake, to flag_value. Join doc lines that broke in
the middle of a sentence. Drop "simply" and first-person wording.

Assisted-by: Claude Code (claude-opus-5)
Change-Id: I15ed8369f2e7dc0266f6104ad3e2ef4879e51ecf
cli::search::drv_name and the body of api::installable::drv_pname
were two more copies of names.cc:DrvName. Both now call
builtins::strings::parse_drv_name_bytes, the one parseDrvName uses.
The split rule is the same in all three: a dash followed by a byte
that is not an ASCII letter. The drv_names and
the_name_a_program_takes_from_a_derivation_name tests still pass
unchanged against the shared helper.

Assisted-by: Claude Code (claude-opus-5)
Change-Id: I02622f88db6f68edaa16d8b95c54f8bdb60192b4
print::tests::float_formatting_is_never_empty only checked that
format_g and json_float return a non-empty string. Six of its eleven
values were already in float_formatting_edge_cases, which checks the
exact text. The other five (0.0, -1e300, f64::MIN_POSITIVE, 1.0, 0.1)
are now cases of float_formatting_edge_cases with their exact text, so
the merged table checks more than the two tests did.

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