roadmap BUILT

614. Two installed versions of one program, each runnable, and a caller granted the one it needs

Minted 2026-09-27 (UTC) by a maintainer-delegated lane, from calef's ask the same day: "One limitation of our model is that we cannot support multiple versions of the same binary on a system. This is important to developers that might run different versions of their frameworks because different packages have different dependencies on upgrading a dependency. We should mint a milestone to address that." (Number provisional until the merge queue lands it. Title and slug are drafts.)

Built 2026-09-29 (UTC) on milestone/614-every-version-live, against the five rulings below. crates/installed_programs carries the ruled shape: rows <digest> <program> <version> <package> keyed on the digest, and the default pointer inside the generation file. Install appends and moves the pointer, so the bare word still means the newest install. Removal follows ruling 5: bare remove takes every live version and the pointer; package@version removes one, moving the pointer to the sole survivor and refusing, candidates named by the shell from the live table, when several remain. Rollback is unchanged. The shell resolves the bare word through the pointer, and consults the nearest version-set file at or above the working directory (asdf-style; built as versions, renamed .jig-versions by §258 (names for two installed versions of one program)). It prints the divergence notice on the spawn line when what ran differs from what the set specifies, and takes program@version as an explicit ask. script/swish-check types it on all three architectures: the second version of greeting installs beside the first, each runs by path, the set selects 0.1.0 for the bare word, and a set naming an uninstalled version produces the notice.

Why two versions cannot coexist today

(The state that made the milestone, kept as minted; the paragraph above is what changed.)

The bytes already can. Install writes a program to packages/<name>/<version>/<program> (notes/packages.md), and remove leaves them there. What cannot hold two is the table that says what may run:

Libraries are not the problem here. There is no dynamic loader and no shared library (notes/abi.md), so each program links its own dependencies at build. Where nife's "framework" versions collide is in programs and the services they talk to.

Prior art

Read 2026-09-27 from each project's own documentation, except where marked.

Options

option what it is verdict
A. The version goes in the name python@3.12, Debian's python3.11: a second package with a second program name Refused as the answer, kept as a fallback. It is what calef called the limitation; uptime at two versions becomes two programs
B. One active version, switched Debian alternatives, brew link: many installed, one live at a time, chosen system-wide Refused. Two consumers needing different versions at once is the whole ask
C. A file in the working directory picks the version asdf's .tool-versions, rustup's rust-toolchain.toml, both behind a shim Refused. It is a search order keyed on ambient state, which §229 ruled out, and the directory rather than a grant decides what runs
D. The table admits every installed version Nix's and Fuchsia's arrangement: a version is identified by its content, and many can be live Recommended, as the table half. Install of a new version appends; the bare name keeps one entry, the default
E. The caller is granted the version it needs Genode routes a child's binary by label; Plan 9 binds a per-process /bin; Fuchsia routes a capability to a component pinned by hash Recommended, as the selection half. In a capability system "which version" is "which file the caller holds", and §219 already made the spawner send bytes rather than a name

The recommendation is D with E. The table stops forgetting a version when another is installed. The bare word still means one version, the default, so §229 is untouched. A specific version is reached by path, or by a directory capability that a project, a session or a package's recipe is granted, in which uptime means 0.1.0. No search order and no ambient lookup is added: the answer falls out of the model rather than fighting it. D alone would leave a developer typing store paths. E alone cannot work, because the progenitor would refuse the old version's digest.

Would it still be chosen at equal cost? Yes. A is cheaper and is refused on what it does to names, not on effort.

Rulings

All five questions below were ruled by calef on 2026-09-29 (UTC), in session with the maintainer; the reasoning is kept to one line each so a reader can check the rule against its reason.

  1. A grant names a version both ways, and the digest is authoritative. The version string is the upstream developer's claim (they know they shipped 0.1.0); the digest is the packager's attestation, minted when the package is built. The tree already has those roles: §195 (a reviewed recipe vouches for a package) is the vouching, the archive carries the member digest, installing verifies, the table enforces. A string alone would let a rebuilt 0.1.0 masquerade; a digest alone would put digests in every diagnostic.
  2. Rows key on the digest; program, version and package are label columns. A rebuild claiming a version string already live is a second row, visible, never a silent replacement. The default pointer lives inside the generation file, so a rollback restores the table and the default together and current stays the one commit point. No architecture column: the digest is of target-specific bytes, so builds for two ISAs never collide in one table. No install datetime: the generation index is a total order with no clock in it, and package writes an install event to §242 (a system log) for timeline reconstruction.
  3. The bare word means the newest install: every install of a program moves its default pointer. This is today's implicit rule written down, so nothing a user does today changes meaning, and §229 stands, one answer per name with no search order. A package default command, if ever wanted, is a table edit that moves the pointer and needs no format change.
  4. The per-project selection is a directory capability named a version set (name provisional). Its content is a committed file of <program> <version> lines: version strings, because people write it, resolved to digests at activation through the live table, so enforcement stays digest-authoritative (ruling 1 one layer down). The shell consults the nearest version set at or above the working directory, asdf-style, on calef's usability ruling; a version set can only select among installed versions, so a cloned repository can ask but cannot install or run uninstalled bytes. Two guards: when the version that ran differs from the version the set specifies, the spawn line says both (uptime 0.2.0 (repo specifies 0.1.0), reworded by §258); and an explicit override exists, by path or by an explicit version-qualified ask. An installing dev tool is follow-on work, not this milestone; the capability, the file and the tool are three provisional names.
  5. jig remove uptime removes every live version of the package, its rows and its programs' pointers: the verb's object is the package (calef, 2026-10-14 (UTC), on milestone 919 (a package carries several programs): "jig remove should work on packages, not programs."), and the version-qualified form removes one. Removing the version that holds a program's pointer moves it to the sole remaining version, and refuses, naming the candidates, when several remain, because no ordering among live versions exists to pick with. Rollback is unchanged (§208): a generation is one snapshot of rows and pointer, and bytes are never deleted, so what it restores is still on disk. Removal is not dependency-aware; see BUGS.

Dependencies

What this unblocks

Done means

BUGS

Follow-on

Added by the build lane, 2026-09-29.

Index row

Two versions of one program could not be installed together: the activation set held one entry per program name, and the progenitor refused bytes whose digest had left it. An upgrade made the old version unrunnable even by path. Built 2026-09-29 as ruled (see the paragraph under the title): the Nix and Fuchsia table, every installed version live and identified by content. The selection is capability-shaped: a caller is granted the version it needs, and the bare word keeps one default. Ruled 2026-09-29: both names with the digest authoritative, digest-keyed rows with the default pointer in the generation file, the bare word means the newest install, and the selection is a version set.