Repository navigation
Conversation
The weekly `Coreutils Args Drift` run went red on 2026-11-09 with 13 compile errors against uutils/coreutils@6a7d199ed. Two unrelated upstream refactors landed in shapes the port tool had no rewrite for, so both the regenerated `format/` module and `ls_args.rs` referenced things bashkit does not link. uucore's `FormatError` moved from a hand-written `impl Display` to `#[derive(thiserror::Error)]`, which put every `translate!` / `translate_text!` call inside an `#[error("{}", ...)]` attribute. The Fluent pass only walked expressions, so all eleven arms came through unfolded: error: cannot find macro `translate_text` in this scope --> crates/bashkit/src/builtins/generated/format/mod.rs:68:19 68 | #[error("{}", translate_text!("format-error-write", ...))] Folding now walks attribute token streams as well. Call arguments are carried as raw `TokenStream` rather than `Expr`, because upstream writes thiserror's `.0` field shorthand there (`String::from_utf8_lossy(.0)`), which tokenizes but is not valid expression syntax; the tokens are interpolated verbatim so thiserror still binds them to the field. Since only the macro's leaf ident is replaced, a qualified `uucore::translate!(…)` in attribute position is now a hard error rather than an emitted `uucore :: "literal"`. Separately, `--quoting-style` moved into the shared `uucore::quoting_style::parser`, so `ls` stopped defining `QUOTING_STYLE` and started re-exporting it, and its arg chain began calling `clap_quoting_argument()`. Args mode now inlines registered uucore clap-helper items: a const/static is spliced in where `mod options` re-exported it (keeping `options::QUOTING_STYLE` and the `use options::*` glob resolving), builder functions are emitted at file root, call sites are flattened to the bare item, the `use uucore::<m>;` is dropped, and `translate!` keys resolve against uucore's own locales rather than the utility's. `CLAP_HELPER_MODULES` is an allowlist, same TM-INF-025 reasoning as the `uu_app()` shape validator: third-party uutils source must not be able to pull arbitrary uucore code into a generated parser by naming it. An unregistered path is left untouched and surfaces as a compile error. Inside a registered module only literal consts/statics and non-generic, nullary, non-async `Arg`/`Command` builders with a single tail expression inline; a `#[cfg]` on a candidate aborts the port, because resolving it would need cargo feature evaluation the port does not do. Regenerated everything against 6a7d199ed and bumped `UUTILS_REVISION`. Beyond the two fixes the only behavioral drift carried in is upstream's: `stat` gained `--format`/`--printf` `overrides_with`, and `ls --quoting-style` help text lost its trailing period when the definition moved to uucore. Ported paths are byte-identical between 6a7d199ed and today's upstream HEAD. Six new tests, each verified to fail with its fix reverted. The differential harness and the uutils multicall build were not run locally (this sandbox refuses to build third-party sources); the drift workflow itself covers them. Claude-Session: https://claude.ai/code/session_01Wy7MByfFw9dxbuNwL2LgfQ
… modules Regenerated by `bashkit-coreutils-port` against uutils/coreutils@f56bd018d. Utilities: cat ls mktemp od readlink realpath shuf stat tac tee truncate Vendored modules: format
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 50756c7 | Commit Preview URL Branch Preview URL |
Nov 09 2026, 09:41 AM |
|
Closing: this PR is an artifact of a verification run, not a genuine drift sync, and merging it would land a worse version of #2895. I dispatched
It does not carry #2895 is the PR to review. The residual drift here is real but trivial — ported paths are byte-identical between Generated by Claude Code |
There was a problem hiding this comment.
Review of the coreutils args/vendored-module sync. The port-tool changes are fail-closed throughout (validators bail on unknown shapes, Fluent errors abort the port), generated diffs match their described upstream causes, and the knowledge doc was updated in the same change. One P2 robustness gap below; no blocking issues.
| path.push(n.ident.to_string()); | ||
| out.push(path); | ||
| } | ||
| UseTree::Rename(r) => { |
There was a problem hiding this comment.
[P2] Renamed helper imports (use uucore::<m>::<sub>::<ITEM> as <ALIAS>) silently produce uncompilable output instead of failing at port time. use_tree_paths keeps only the original ident (path.push(r.ident.to_string()), dropping r.rename), and splice_clap_helper_imports re-emits the definition under that original name (let name = &tail[2]; ... resolved.consts.get(name)), while all call sites keep referring to <ALIAS>. The port then exits success and the breakage only surfaces at cargo build. Same root cause as a second latent path: nothing asserts the emitted items are free of uucore-rooted paths (the flattener only visits uu_app + util-file helpers, never mod options or the inlined helper bodies), so any future non-use-item helper reference also becomes a build break rather than a port-time bail. Suggested fix: bail on UseTree::Rename in helper paths (or re-emit the alias), and add a final scan that bails if any uucore-rooted path remains in the emitted items. Not reachable with today's single-registry-entry inputs (upstream uses no renames; the inlined clap_quoting_argument is self-contained), and the failure mode is loud, hence P2.
Review summary (head
|
Automated regeneration of argument surfaces and vendored modules
ported from uutils/coreutils.
Source revision:
f56bd018d(was6a7d199ed)Utilities: cat ls mktemp od readlink realpath shuf stat tac tee truncate
Vendored modules: format
Trigger:
.github/workflows/coreutils-args-drift.ymlThis PR bumps
UUTILS_REVISIONincrates/bashkit/src/builtins/generated/mod.rs, the matching<util>_args.rsfiles, and any vendored module treesatomically — args codegen, module-vendor mode, and the
body-drift harness all stay aligned to the same rev.
Review the diff to confirm whether upstream:
format/)Squash-merge as a human so the merge commit is attributed
correctly per
AGENTS.md. Intermediate bot commits in this PRare discarded by squash.
Design:
knowledge/runtimes/coreutils-args-port.md.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.