feat(coreutils): add the tmpl applet, on a shared renderer - #444
Closed
raphaelvigee wants to merge 1 commit into
Closed
raphaelvigee wants to merge 1 commit into
raphaelvigee wants to merge 1 commit into
Conversation
raphaelvigee
commented
Aug 29, 2026
Member
raphaelvigee
force-pushed
the
raphaelvigee/coreutils-sed
branch
from
August 29, 2026 22:44
1cd7454 to
1dedd2a
Compare
raphaelvigee
force-pushed
the
raphaelvigee/coreutils-tmpl
branch
from
August 29, 2026 22:44
21f261c to
f328a20
Compare
raphaelvigee
force-pushed
the
raphaelvigee/coreutils-sed
branch
from
September 3, 2026 16:26
1dedd2a to
a8bd0a9
Compare
raphaelvigee
force-pushed
the
raphaelvigee/coreutils-tmpl
branch
from
September 3, 2026 16:26
f328a20 to
49acb17
Compare
The `template` rule is the surface to reach for — declared inputs, no subprocess. `tmpl` exists for what the rule cannot express: filling in a file *during* a recipe, from values the recipe computed, which is otherwise done with `sed -i` or `envsubst`. `tmpl [-i IN] [-o OUT] [--set NAME=VALUE]... [--env]`, stdin to stdout by default. `--set` wins over `--env`: the environment is the broad default and each `--set` is a deliberate override. The rendering moves to `crates/template`, shared with the driver, rather than being copied. It is small enough to be tempting to copy and exactly the wrong thing to copy: strict undefined behaviour and the absent template loader are *configuration*, and configuration in two places drifts — a loader enabled on one side and not the other would be a sandbox hole nobody notices. The crate depends on minijinja alone, so `builtins` does not gain the forty utility crates to reuse it. TEMPLATE_FORMAT_VERSION 1 -> 2 while moving it: minijinja drops a template's trailing newline by default, and these render *files*. A config file that has lost its final newline is wrong, and every diff against it is noisy. COREUTILS_VERSION 4 -> 5: the applet set changed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0181d7hhbYWXT42Z1KQPM29Q
raphaelvigee
force-pushed
the
raphaelvigee/coreutils-sed
branch
from
September 3, 2026 16:57
a8bd0a9 to
3c76171
Compare
raphaelvigee
force-pushed
the
raphaelvigee/coreutils-tmpl
branch
from
September 3, 2026 16:57
49acb17 to
93b9688
Compare
This was referenced Sep 3, 2026
Member
Author
|
Superseded by consolidation. The applet halves of this PR (#442 tar/gzip/zstd, #443 sed, #444's
No content was dropped — the restacked tree is byte-identical to the eight-commit version, and every layer builds, lints and passes its unit tests on its own. Fewer layers also matters now that stacked PRs get no CI unless labelled (#449). |
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.