Repository navigation
chore(builtins): sync uutils/coreutils argument surfaces and vendored modules - #2746
Merged
Merged
Conversation
… modules Regenerated by `bashkit-coreutils-port` against uutils/coreutils@8613dffab (was 6579cc2). Utilities: cat ls mktemp od readlink realpath shuf stat tac tee truncate. Vendored module: format. Behaviour is unchanged in bashkit: - `parse_escape_only`/`parse_escape_code` take upstream's new `EscapeSet`. Both vendored call sites pass `WithUnicodeAndQuote`, which is what the code did unconditionally before, so `%b` and format-string escapes keep treating `\"`, `\u` and `\U` as escapes. - `%q` moves from `locale_aware_escape_name(.., SHELL_ESCAPE)` to upstream's `locale_aware_shell_escape` shorthand; the shim routes both to the same `shell_quote`. - `QuotingStyle::C_NO_QUOTES` becomes `QuotingStyle::Escape` (the rename the shim pre-absorbed in #2738); both map to the same no-op escaping, and `DIAGNOSTIC_QUOTING_STYLE` already named the new spelling. - `set_exit_code` calls move into the per-error match arms. It is a no-op in bashkit, which reports status through `ExecResult`. `format_float_decimal`/`format_float_scientific` gain upstream's bounded zero-padding: fractional digits are capped at `u16::MAX` and integer zero-extension is refused past the existing `MAX_FORMAT_WIDTH` (1M) instead of formatting at an unbounded precision.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 7bcdd93 | Commit Preview URL Branch Preview URL |
Oct 17 2026, 10:11 AM |
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.
What changed
Regenerated the ported coreutils argument surfaces and the vendored
uucore::formatmodule against
uutils/coreutils@8613dffab(was6579cc2), bumpingUUTILS_REVISIONand the 20 generated files together.Utilities:
cat ls mktemp od readlink realpath shuf stat tac tee truncate.Vendored module:
format.formatmodule — inert in bashkitEscapeSet(new) —parse_escape_code/parse_escape_onlynow take an escape-setargument selecting whether
\",\uand\Uare escapes. Both vendored call sites(
parse_spec_and_escapefor format strings,%binspec.rs) passWithUnicodeAndQuote, which is exactly what the code did unconditionally before. TheWithoutUnicodeAndQuotearm is upstream'secho-style path and is unreachable from bashkit.%q— moves fromlocale_aware_escape_name(.., SHELL_ESCAPE)to upstream's newlocale_aware_shell_escapeshorthand. The shim routes both to the sameshell_quote.QuotingStyle::C_NO_QUOTES→QuotingStyle::Escape— the rename the shimpre-absorbed in fix(builtins): track uucore quoting-style rename in printf shim #2738; both map to the same no-op escaping, and
DIAGNOSTIC_QUOTING_STYLEalready named the new spelling, soprintf'sdiagnostic prefix-matching stays in step.
set_exit_code— calls move into the per-error match arms. It is a no-op inbashkit, which reports status through
ExecResult.format_float_decimal/format_float_scientificgain upstream'sbounded zero-padding: fractional digits capped at
u16::MAX, and integerzero-extension refused past the existing
MAX_FORMAT_WIDTH(1M) instead of formattingat an unbounded precision. This tightens a resource bound rather than loosening one.
Argument surfaces — two small accepted-input changes
lsandodbuild their clap commands from the generated definitions, so these areuser-visible at the parsing layer:
odgains-Bas a short alias for--skip-bytes, and its help text changesSkip bytes input bytes→Skip BYTES input bytes.-Bis newly accepted.lsdrops the mutualoverrides_withbetween--diredand--hyperlink, and--hyperlink=c-maybebecomes its own possible value rather than an alias ofc.bashkit's
lsimplementation reads neither flag (both parse and are ignored), so theobservable result is unchanged; only which combinations clap accepts shifts.
Everything else in the
*_args.rsfiles is the revision header.Why
This is the drift the weekly
coreutils-args-driftrun had been detecting but neversurfacing. The run was failing outright since the uucore quoting-style rename (fixed in
#2738), and its PR path edited a closed PR instead of opening one (fixed in #2745). With
both repaired, this is the backlog that had accumulated — regenerated by the workflow
itself (run 39019907688),
not by hand.
Before / After
Because
%b/%q/float formatting were the paths most exposed, the same 20 printf caseswere run against real bash (5.2.21) with the generated tree before and after this
change, built from the same tree otherwise:
main)The three divergences are byte-identical before and after, so none is introduced here:
These are pre-existing, intentional bashkit-vs-bash differences (bashkit's
printffollowscoreutils semantics for
\u/\Uand%q), unrelated to this sync.Other validation on the regenerated tree:
cargo build -p bashkitclean;cargo fmt --checkclean.cargo test -p bashkit --lib→ 3061 passed.cargo test -p bashkit --test integration -- spec_tests→ 4 passed (bash/awk/grep/sed spec suites).cargo test -p bashkit --test integration -- printf→ 18 passed.knowledge/status/builtins.jsonneeds no regeneration: it records{feature, name}perbuiltin (230 entries) and carries no flag-level detail, so the
ls/odarg changescannot drift it.
BASHKIT_RUN_COREUTILS_DIFF=1differential harness and cat/tac spec tests.The strict host-bash/grep/sed comparison gates are
#[ignore]d locally and run in CI(
ci.yml), so they are covered by this PR's own CI rather than reproduced here.Risk
crates/bashkit/src/builtins/generated/. Nohand-written code, no public API, no feature flags touched.
no-op at both call sites, as the differential above shows.
od -Balias widens accepted input by one flag, matching upstream.Checklist
the change is a regeneration with no new code paths reachable from bashkit