Skip to content

spool fetches - #2

Merged
martin-k-m merged 3 commits into
mainfrom
feat/fetch-over-the-process-interface
Sep 1, 2026
Merged

martin-k-m merged 3 commits into
mainfrom
feat/fetch-over-the-process-interface

Conversation

@martin-k-m

Copy link
Copy Markdown
Collaborator

docs/needs.md entry 1 was the last open item on that list: a package manager fetches by running git clone, git rev-list and git checkout, and twill had no way to start a program, so src/vendor.tw called a run that did not exist. twill 1.8.0 has it — twill-lang/twill#20, released as v1.8.0 — with the signature that entry asked for.

git() is one line now. It used to unwrap a status byte the old run put in front of its output, because the language could not return two values; entry 10 called that the ugliest thing in spool and this was its last hiding place.

Verified by fetching, not by reading the builtin list. Against a git repository tagged v1.2.0, spool install clones it, resolves the constraint, vendors the package into twill_modules/ and writes a spool.lock carrying the commit and the content hash.

published_versions now answers a Res. A repository that clones and carries no readable tag publishes no versions; one that cannot be reached at all — no git on PATH, TWILL_NO_EXEC set, a URL nobody can clone — is a different failure, and folding both into an empty list made spool report the local problem as the repository's. With TWILL_NO_EXEC=1 it now says run: refused to start "git" because TWILL_NO_EXEC is set instead of "publishes no version tags".

CI and spool.toml both move to 1.8.0 in the second commit.

🤖 Generated with Claude Code

twill grew run(program, argv, dir) -> Res[Str, Str], so git() is one line and
the status-byte encoding docs/needs.md entry 10 called the ugliest thing in
spool is gone from its last hiding place.

Verified by fetching rather than by reading the builtin list: against a git
repository tagged v1.2.0, install clones it, resolves the constraint, vendors
the package into twill_modules/ and writes a spool.lock with the commit and
the content hash.

published_versions now answers a Res. A repository that clones and carries no
readable tag publishes no versions; one that cannot be reached at all -- no
git on PATH, TWILL_NO_EXEC set, a URL nobody can clone -- is a different
failure, and folding both into an empty list made spool report the local
problem as the repository's.
Same coupling as warp: run is not in a twill release, so CI's pinned
v1.7.1 fails at twill check. The pin moves when the release exists.
run is in a release now, so CI installs v1.8.0, spool.toml asks for ^1.8.0,
and the paragraph saying this code needs an unreleased compiler goes with
them.
@martin-k-m
martin-k-m merged commit 8bf4e5d into main Sep 1, 2026
2 checks passed
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