Versions 239 to 318
Lines 2–12 at 318 (were 2–11 at 239)
33
5−import { StableSet, unionOverlay } from "../../src/engine/state-source.ts";
Lines 26–38 at 318 (were 25–32 at 239)
28− view(set: ReadonlySet<AtomId>): ReadView;
34+ /** A key naming everything a draft's part of the answer depends on: shared's version, its base and its atoms. */
3137
Lines 101–119 at 318 (were 95–110 at 239)
98− // Shared now with each agent's draft on top, once per agent. Over shared's view's own set (abso Capacity): a view's set
99− // is closed under dependencies anyway, so shared's closed set and the drafts lay out what shared's atoms and the drafts
100− // do, and only the drafts' atoms are walked to close it.
101− const withDraftsView = (...drafts: readonly AtomId[][]) => host.view(unionOverlay(sharedView.set, drafts.flat()));
102− const nowViews = new Map<Agent, ReadView>();
103− const nowViewOf = (agent: Agent) => {
104− let view = nowViews.get(agent);
105− if (!view) nowViews.set(agent, (view = withDraftsView(host.draft(agent))));
106− return view;
104+ // Shared now with each agent's draft on top (project.ts, draftsView): kept between calls while shared and the
105+ // draft stay the same, and laid out as shared is for every file the draft doesn't touch (abso Capacity).
107+ // Each draft's uses and changed definitions, and each pair's names defined twice, kept between calls (kept-parts.ts,
Lines 169–183 at 318 (were 160–169 at 239)
177+ return parts ? parts.get(`twice ${keyOf(a)} | ${keyOf(b)} ${file}`, make, definitionsBytes) : make();
164− both ??= withDraftsView(draftA, draftB);
165− if (!both.hasFile(file)) continue;
166− for (const [name, defs] of definedTwice(both, file)) {
167181 const by = (mine: Set<AtomId>) => defs.find((d) => d.lines.some((l) => mine.has(host.graph.lineAtom(l)!)));
Lines 197–204 at 318 (were 183–189 at 239)
186− for (const d of host.definitionRule().collisions(draftSet(b), viewB, sharedView, nowView, newer, SHARED)) {
201+ for (const d of host.definitionRule().collisions(draftSet(b), viewB, sharedView, nowView, newer, SHARED, kept)) {
Lines 210–216 at 318 (were 195–200 at 239)
200216 options.folder !== undefined ? options.folder.split("/").filter((s) => s !== "" && s !== ".") : undefined;
- MCP
- compare on this site's /mcp
- CLI
- abso diff 239 318 worker/project/draft-collisions.ts --json
- JSON
- /christopher/abso-core/compare/239..318?file=worker%2Fproject%2Fdraft-collisions.ts&format=json