Skip to content

feat(coreutils): the toolbox is on by default - #445

Open
raphaelvigee wants to merge 1 commit into
raphaelvigee/coreutils-template-driverfrom
raphaelvigee/coreutils-default-on
Open

feat(coreutils): the toolbox is on by default#445
raphaelvigee wants to merge 1 commit into
raphaelvigee/coreutils-template-driverfrom
raphaelvigee/coreutils-default-on

Conversation

@raphaelvigee

@raphaelvigee raphaelvigee commented Aug 29, 2026

Copy link
Copy Markdown
Member

coreutils: true becomes the default on the exec/bash driver. Fifty-five lines, and the decision the whole stack exists for.

A toolbox nobody enables fixes nothing: the point of shipping these utilities is that a recipe behaves the same on Linux and macOS without anyone opting in. Leaving it off by default would mean the divergences in #438 keep biting everyone who hasn't heard of the flag.

What this changes

Every exec/bash target gets heph's cp, install, sed, sha256sum and the rest on its PATHbehind everything the environment provides, so a declared tool and a runner's environment both still win. Where the target's PATH previously resolved to a host binary that heph now supplies, it resolves to heph's.

coreutils: false is the escape hatch, and opting out is itself folded into the def hash — a cache-visible decision rather than a silent one.

Why it is its own PR

It has its own revert line. If the flip proves too disruptive it can go back without losing the toolbox, and #446 can be reverted without losing the flip. Bundling either pair would force an all-or-nothing rollback of a change this broad.


The stack

Merge bottom-up, and gh stack sync after each one lands — master is squash-only, so the rebase will conflict and the resolution rule in CLAUDE.md applies.

PR What
6 #446 drop the host directories from a target's PATHbreaking
5 #445 the toolbox on by default
4 #440 the template rule and the tmpl applet
3 #453 grep, find, xargs, sed, tar, gzip, zstd
2 #438 the crate, the entry points, the shim directory
1 #451 the runner PATH seam ← base, targets master

Only #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

@raphaelvigee
raphaelvigee force-pushed the raphaelvigee/coreutils-default-on branch from 26dfdb8 to 76b42ed Compare August 29, 2026 22:44
@raphaelvigee
raphaelvigee force-pushed the raphaelvigee/coreutils-default-on branch from 76b42ed to 51b3ae2 Compare September 3, 2026 16:26
@raphaelvigee
raphaelvigee force-pushed the raphaelvigee/coreutils-default-on branch from 51b3ae2 to ac12896 Compare September 3, 2026 16:57
A toolbox nobody enables fixes nothing. The point of shipping `cp`,
`install` and `sha256sum` in the binary is that a recipe behaves the same
on Linux and macOS without anyone opting in, so `coreutils:` now defaults
to true.

`coreutils: false` is the escape hatch for a workspace that genuinely
wants the host's tools. Opting out is folded into the def hash as well, so
it is a cache-visible decision rather than a silent one: turning it off
invalidates the targets it affects, which is what you want, because their
outputs may change.

A driver built by `new_exec`/`new_bash` rather than from options still
starts off. Those are what test harnesses and the shell fallback use, and
they have no heph home to materialize shims under — switching the toolbox
on there would trip the "no shim directory was supplied" assertion rather
than doing anything useful. There is now a test pinning that, because the
distinction is not obvious from either constructor.

The flip caught one existing test: a spawn-diagnostic test built its
driver from options and never supplied shims, so it started failing the
moment the default changed. It now opts out explicitly — it is about the
error message, not about PATH composition. That is the assertion working
as intended: a host that builds from options must supply shims, and
degrading to "no builtins" instead would run the target against the
host's utilities while its cache key claimed heph's.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0181d7hhbYWXT42Z1KQPM29Q
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant