Versions 175 to 318
new file, 183 lines
1+// A version of shared without some earlier versions: the files that version's atoms make when the atoms those
2+// versions added are left out. Shared doesn't change, and nothing is written: it is a read. The atoms keep
5+// The set left is checked exactly as asked. When a kept version builds on a left-out one, the answer is a
6+// refusal naming that chain, the files and the wider set that would work. It is never widened silently, and
8+
15+
28+
35+
36+/** A kept version that builds on a left-out one: the versions it builds on, and in which files. */
40+
46+ /** Every file that differs from the version as it is: before, in it; after, without the others. */
48+ /** The tree hash (tree.ts) of every file without them: the same ask always gives the same hash. */
57+ /** The versions to leave out for it to work: these and every dependent. A suggestion, never applied. */
60+
66+export function without(host: WithoutHost, version: number, versions: readonly number[]): WithoutAnswer {
69+ if (!Number.isInteger(version)) throw new ProjectError("bad-request", "version must be a number");
81+ `there is no version ${String(v)} to leave out (version 0 is the start, which everything builds on)`,
84+ throw new ProjectError("bad-request", `version ${v} comes after version ${version}, so it isn't in it`);
95+ `version ${v} isn't in version ${version}: version ${shared.droppedIn.get(p.atoms[0]!)} dropped it`,
106+
122+ // A discarded atom a publish still needs has no version of its own: it counts with the version that needs it.
159+ suggestion: [...new Set([...asked, ...dependents.map((d) => d.version)])].toSorted((a, b) => a - b),
162+
163+ // The set is checked; the engine's View refuses one that isn't closed, so nothing left out comes back.
- MCP
- compare on this site's /mcp
- CLI
- abso diff 175 318 worker/project/without.ts --json
- JSON
- /christopher/abso-core/compare/175..318?file=worker%2Fproject%2Fwithout.ts&format=json