on master help sign in
Cover forward dependency resolution

Extend the forward-reference golden into a multi-link chain and exercise projection artifact retention when an exported alias precedes its dependency.

commitec7c6d47d9e112c4563882c82b8c3add3b4570a7 authoriko <mail@iko.soy> dateMon 2 Nov 2026, 23:41 (12 hours ago) parentba67080
6 files changed+20−6
tests/golden/types-partial-forward/about.txt+1−1 tests/golden/types-partial-forward/source.jibb+3−1 tests/golden/types-partial-forward/tokens.txt+10−2 tests/golden/types-partial-forward/tree.txt+3−1 tests/golden/types-partial-forward/types.txt+2 tests/lib/jibb-proj-guards.hoon+1−1
tests/golden/types-partial-forward/about.txt+1−1
@@ -1,4 +1,4 @@
11source: Grammar tab, Molds: "every expression has a principal type, and there is no general subtyping".
2−tests: partial inference: a forward reference resolves in dependency order.
2+tests: partial inference: a multi-link forward-reference chain resolves in dependency order.
33expect: parses
44expect-types: a partial inference report, not a checked module
tests/golden/types-partial-forward/source.jibb+3−1
@@ -1,2 +1,4 @@
11++ first second
2−++ second "later"
2+++ second third
3+++ third fourth
4+++ fourth "later"
tests/golden/types-partial-forward/tokens.txt+10−2
@@ -4,5 +4,13 @@
442:1 NEWLINE
552:1 glyph ++
662:4 name second
7−2:11 str "later"
8−2:18 NEWLINE
7+2:11 name third
8+3:1 NEWLINE
9+3:1 glyph ++
10+3:4 name third
11+3:10 name fourth
12+4:1 NEWLINE
13+4:1 glyph ++
14+4:4 name fourth
15+4:11 str "later"
16+4:18 NEWLINE
tests/golden/types-partial-forward/tree.txt+3−1
@@ -1,3 +1,5 @@
11(module
22 (value 1:1 first (wing 1:10 second))
3− (value 2:1 second (str 2:11 "later")))
3+ (value 2:1 second (wing 2:11 third))
4+ (value 3:1 third (wing 3:10 fourth))
5+ (value 4:1 fourth (str 4:11 "later")))
tests/golden/types-partial-forward/types.txt+2
@@ -1,3 +1,5 @@
11partial inference; module not checked
22++ first: @t
33++ second: @t
4+++ third: @t
5+++ fourth: @t
tests/lib/jibb-proj-guards.hoon+1−1
@@ -58,7 +58,7 @@
5858 proj-graph-errors
5959++ proj-graph-errors
6060 ^- (list tape)
61− =/ child=@t '++ owned ^- [a=@t b=@p] (proj [a="hi" b=~zod c=%.y])\0a++ exported owned\0a'
61+ =/ child=@t '++ exported owned\0a++ owned ^- [a=@t b=@p] (proj [a="hi" b=~zod c=%.y])\0a'
6262 =/ parent=@t '/= dep /ui/dep\0a++ answer exported.dep\0a'
6363 =/ bundle=jbundle:jibb ~[[/ui/dep/jibb child]]
6464 =/ built=jfile-result:jibb (infer-jibb-file:jibb /ui/root/jibb parent ~ ~ bundle ~[/ui/root/jibb] ~ ~ ~ ~)