Repository navigation
feat(rm): GNU coreutils 9.4 rm library port - #1751
Merged
Merged
Conversation
- rm.rs + rm/ layers: -f/-i/-I/-r/-R/-d/-v/--preserve-root, empty operand - deep recursion with GNU error continuation; reparse links removed as links - 31 library tests; registry entry added (not wired into CMake)
# Conflicts: # rust2/crates/winuxcmd-driver/src/main.rs
caomengxuan666
marked this pull request as ready for review
November 14, 2026 15:50
caomengxuan666
added a commit
that referenced
this pull request
Nov 15, 2026
#1751 (rm wire) converted run_direct�s if/else-if chain into a match but left residue: a after the tail arm and a stray second opening before the tty arm. Result: driver/main.rs is invalid Rust — one unclosed — and every main build leg has been failing since (#1750/#1751 landed). The repaired form is a single match: tail, rm (body re-indented to arm depth), tty/test/[/nohup/touch arms direct, dispatch fallback as the arm. Byte-identical command semantics; the structure is what #1751 intended. Verified: cargo build -p winuxcmd-driver clean; winux-cmds lib 975/0; scripts/i18n_rust.py tokenizes the repaired file and the rust2/crates extraction pass runs (401 messages) — the i18n-drift job�s crash (unclosed Rust source delimiter in main.rs) is the same breakage surfacing through the extractor.
This was referenced Nov 15, 2026
aphrody-dev
pushed a commit
to aphrody-labs/WinuxCmd
that referenced
this pull request
Nov 20, 2026
Retire the 1.x rm pipeline: src/commands/rm.cpp keeps only the
REGISTER_COMMAND metadata plus the original-argv abbreviation guard, then
hands ctx.raw_args to winux::rust2::run_command_with_stdin_streaming("rm").
The library is the already-landed 38e6835 (unixwin#1751) port (rm.rs + rm/,
31 library tests).
The guard stays on the C++ side because the shared dispatcher expands
unambiguous long-option prefixes before the handler, which erases the
spelling rm.c refuses: `rm --no-p f` must still die with "you may not
abbreviate the --no-preserve-root option" and `rm --no-p=v f` with the
doesn't-allow-an-argument diagnostic. It reads process argv (__wargv)
exactly as the 1.x body did; the Rust prescan gets ctx.raw_args verbatim
only on the gate driver path.
CMake: append rm to WINUXCMD_RUST2_COMMANDS (union) before rmdir.
Evidence: cargo test -p winux-cmds rm:: 31/31; manual abbreviation guard
and `-h` diagnostics byte-identical to the baseline exe.
Known reds (library/gate-corpus gaps, reported not fixed): rm has no
rust2/gate/cases/rm.tsv, so `run-gate.sh rm` errors with "no case table";
2 rm.* ctests fail - trailing-separator file operand (expected Not a
directory rc 1, got silent rc 0) and the 1.x internal wildcard expansion
(2.0 retires it to the shell per DOCS/2.0-MIGRATION.md section 3).
aphrody-dev
pushed a commit
to aphrody-labs/WinuxCmd
that referenced
this pull request
Nov 20, 2026
The inventory still called six commands c++-only after their rust2 library/wire landed. Rows now say state=wired, status=rust2-wired, engine=rust2, with commit evidence in the anchor: - ls: unixwin#1762 library 3025942; f87be22 wire (this branch) - rm: unixwin#1751 library 38e6835; f14bc60 wire (this branch) - find: unixwin#1634 library; 792c31f (unixwin#1696 wire); unixwin#1633/unixwin#1658 help/version - grep: unixwin#1660 library; 0eb0d28 (unixwin#1660 wire); -P face stayed on the C++ PCRE2 path per DOCS/2.0-regex-engine-decision.md - mv: unixwin#1649; a0cfcd7 (unixwin#1773 reland that wired the 1.x retirement) - sed: unixwin#1635 library; f36f306 (unixwin#1690 wire) No code changes; loc/oracle/test columns are historical measurements and stay as recorded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rm.rs + rm/ layers (opts/walk/winfs), 31 tests: -f/-i/-I/-r/-R/-d/-v, empty operand, preserve-root floor, deep recursion with GNU error continuation, reparse links removed as links. Registry entry added; not wired into CMake yet. Refs #1488