Hazel reports · ^report(26) · review · started 2026-10-22 · work in progress · about 4 minutes to read
Does #2681 Need #2661?
Alexander, on #2681 (a value known to have a type is not walked again for it): Looks like it needs #2661 as a dependency. Might be worth just changing the parent branch of the pr to that branch.
Matthew: It seems like a real dep, but I'll double check.
This is that double check (^ticket(541)), made with git alone, nothing built or run.
Short answers.
- Yes, #2661 is a real dependency. #2681's own commit,
8546bde64e, keys its memo by the type's hash:known_to_haveandnotedboth callTypHash.hash(t), which #2661 adds. Without #2661, #2681 does not compile. - #2681 carries #2661 today as merges, not as a base. Its branch merged #2661's first two commits (
0875dfcd66,67f676852b) and #2679 (a032bd5c6a), and holds a copy of #2661's third (a4fee77a63, the same patch as #2661's09b8af372f). So againstdevits diff is 39 files, the dependencies included, and it is 14 commits behinddev. - Retargeting works, after one merge. #2661's branch is up to date with
dev(it mergeddev, which now has #2679). Merging #2661's head into #2681's branch conflicts inAscriptions.re, the known conflict between #2661's and #2679's helpers, and #2681's side is the right resolution: it already has both helpers and the memo. After that merge, #2681 against #2661's branch is 4 files, +161 and -2: its own commit, one line of layout apart. - So Alexander's suggestion is the simplest review. Merge #2661's head into #2681's branch (resolution: #2681's
Ascriptions.re), push, and set #2681's base totyp-hash-consistent. Reviewers see one commit. When #2661 lands, #2681's base goes back todevand its diff stays that one commit.
The evidence#
What #2681's commit uses from #2661#
known_to_have = (d, t) => switch (type_key(d), TypHash.hash(t)) { ... }
noted = (e, t, r) => switch (r, TypHash.hash(t)) { ... }
let has_type: Util.IdentityTable.t(Obj.t, list(TypHash.t))
The memo remembers, per value, the hashes of the types it has; a lookup asks for the type's hash. TypHash is #2661's module, so the dependency is in the memo's design, not incidental.
The branches today#
| branch | head | against dev |
|---|---|---|
#2661, typ-hash-consistent | 09b8af372f | 4 commits ahead (its three, and a merge of dev), 0 behind |
#2681, ascriptions-has-type | a4fee77a63 | 6 commits ahead (#2661's first two, a merge of #2679, its own 8546bde64e, a merge of #2661's three-lane hash, a copy of #2661's test commit), 14 behind |
a4fee77a63 on #2681 and 09b8af372f on #2661 have the same patch (git patch-id), so the merge below takes it once.
The retarget, simulated#
In a scratch worktree, never pushed: #2681's head, merged with #2661's head.
- One conflict, in
Ascriptions.re. #2681's side keeps both helpers (#2661'sconsistent_by_hash, #2679'sunchanged) and the memo; #2661's side has the first two. - Resolved with #2681's side, the diff against
typ-hash-consistentisAscriptions.re+84 -2,IdentityTable.re+24,Util.re+1,Test_Ascriptions.re+54:8546bde64e's four files (its own stat is +83 -1 inAscriptions.re; the extra line is layout aroundtransition).
The steps#
- On
ascriptions-has-type:git merge origin/typ-hash-consistent; resolveAscriptions.rewith #2681's side; build and runAscriptions,TypHashandEvaluator(on GitHub's CI). - Push, then set #2681's base to
typ-hash-consistent. The PR then shows one commit. - Optionally, in the same push: the depth-1 limit on the memo and its test (proposed on #2681, measured in
^report(25)). - When #2661 merges into
dev, set #2681's base back todev(GitHub does it on its own if #2661's branch is deleted).
How this was put together#
git on dev at 962a7cb009, #2661 at 09b8af372f and #2681 at a4fee77a63, 2026-10-22: git log per branch, git merge-base --is-ancestor per commit, git patch-id for the copied commit, and the merge in a scratch worktree (resolution recorded, nothing pushed). The stats are in data/.
The data#
- The numbers, for programs too: every table in this report, and what its numbers measure, is also in this page as JSON, in its
<script type="application/json" id="report-data">element, so a reader or an agent that fetches the page alone has the dataset. The same, with any raw files that survive, is in026/data/.