package manager: resolve and lock two majors of one package #323
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Slice 1 of 3 of #28 (two majors of one package in one graph). The resolver and the lock treat the package name as the identity, so two majors of
acme/json(for example^1.2wanted by one dependency and^2.0by another) fail with a conflict today.Design
docs/design/PROJECT.md section 6a ("One version per package in a graph, not one per major"): the resolver's package becomes
(name, major). CONCEPT "Packages and the Supply Chain" already promises one version per major, so this lifts a restriction and breaks nothing that resolves today.Scope
compiler/src/package/resolve.trb(andindex.trbwhere it keys by name): solver package key(name, major); a requirement^1.2or>=1.2 <2selects the key of its major; a requirement that spans majors (>=1 <3) is split per major as alternatives, preferring the highest major only where both satisfy, so existing graphs resolve exactly as before.compiler/src/package/lock.trb:packagelines may repeat a name with different majors; the order stays deterministic (name, then version); reading andtorb lock --checkaccept it. Single-major locks are byte-identical to today.acme/json 1.x/2.xwhere the major matters.Acceptance criteria
aneedsacme/json ^1andbneedsacme/json ^2resolves to one version of each major.torb lock --checkpasses on it.^1.2vs<1.1) still fails with an explanation naming the major.Seed impact
None: no syntax, native, driver flag or std name change. The lock format only gains a repeated name.
Dependencies
None. Size: one PR (
feat(package): resolve and lock two majors of one package). Blocks the next slices.[loop:torbscript] refine: split out of #28 as slice 1 of 3; goal, acceptance criteria, design link and seed impact stated, one PR. label ready, next: implement
[loop:torbscript] claim implement by session:loop-torbscript-20261012 until 2026-10-12T14:25Z
[loop:torbscript] release: implement worker died on the account session limit before pushing a branch (resets 13:00 Berlin); respawning
[loop:torbscript] claim implement by session:loop-torbscript-20261012 until 2026-10-12T17:04Z
[loop:torbscript] release: implement worker terminated after opening PR #328 (head
6f592335): tier A (linux-x64) red, PR not mergeable against main after #329; respawning[loop:torbscript] claim implement by session:loop-torbscript-20261012 until 2026-10-12T19:12Z