feat(coreutils): the rest of the toolbox — grep, find, xargs, sed, tar, gzip, zstd - #453
Open
raphaelvigee wants to merge 1 commit into
Conversation
…r, gzip, zstd The seven utilities a build recipe reaches for that uutils does not carry, so the toolbox covers a real recipe rather than only the easy half of one. Each is the same shape as the applets already in the table — a name, a `run` fn, golden tests — and each is here for a divergence that bites in practice: - `grep`, `find`, `xargs` (`grep-*`, `ignore`): BSD `find` has no `-printf`, and the two `xargs` disagree about `-r`. Built on the crates ripgrep uses, so the matcher is a known quantity rather than a fresh regex engine. - `sed`: the divergence that started this. GNU takes an optional `-i` suffix, BSD requires one, so `sed -i 's/a/b/' f` edits in place on Linux and eats the next argument as a filename on macOS. - `tar`, `gzip`, `zstd`: **reproducible by construction** — no mtimes, no uid/ gid, no name-ordering left to readdir, and compression levels pinned. An archive is usually a build *output*, so a tar that embeds a timestamp is a target that can never be a cache hit twice. Landed as one change rather than three: they touch the same four files (`Cargo.toml`, the applet table, a module apiece, `COREUTILS.md`) and ask the reviewer the same question — is this the right crate, and is the behaviour right — so the applet set reads better judged in one pass than in three. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0181d7hhbYWXT42Z1KQPM29Q
This was referenced Sep 3, 2026
This branch has not been deployed
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.
The seven utilities a build recipe reaches for that uutils does not carry, so the toolbox covers a real recipe rather than only the easy half of one. Each is the same shape as the applets already in the table — a name, a
runfn, golden tests — and each is here for a divergence that bites in practice.grep,find,xargs(grep-*,ignore) — BSDfindhas no-printf, and the twoxargsdisagree about-r. Built on the crates ripgrep uses, so the matcher is a known quantity rather than a fresh regex engine.sed— the divergence that started this. GNU takes an optional-isuffix, BSD requires one, sosed -i 's/a/b/' fedits in place on Linux and eats the next argument as a filename on macOS.tar,gzip,zstd— reproducible by construction: no mtimes, no uid/gid, no name ordering left toreaddir, compression levels pinned. An archive is usually a build output, so a tar that embeds a timestamp is a target that can never be a cache hit twice.Why one PR and not three
This replaces #442, #443 and #444's applet halves. They touch the same four files —
Cargo.toml, the applet table, a module apiece,COREUTILS.md— and ask the reviewer the same question three times: is this the right crate, and is the behaviour right. The applet set reads better judged in one pass.Every layer of the stack builds, lints and passes its unit tests independently.
The stack
Merge bottom-up, and
gh stack syncafter each one lands —masteris squash-only, so the rebase will conflict and the resolution rule in CLAUDE.md applies.PATH— breakingtemplaterule and thetmplappletPATHseam ← base, targetsmasterOnly #451 builds automatically: since #449 a stacked PR is skipped unless it carries
ci/force-ci. Every layer was checked locally on its own —cargo build --workspace --all-targets,cargo clippy --workspace --all-targets, and its unit tests — not just at the top of the stack.🤖 Generated with Claude Code
https://claude.ai/code/session_0181d7hhbYWXT42Z1KQPM29Q