Lowering currently rediscovers the shape of the source as it walks it. Indexing the raw tree once —
pointer to raw node plus a shape classification — would make reference resolution a lookup rather
than a walk, let cycle detection and alias-amplification refusal share the single walk they
currently duplicate, and give morphic compile --explain a real substrate instead of re-deriving
what it reports.
Why this is not being done yet
$ref handling carries open defects: #40 (percent-encoded fragments fail to resolve), #141 (an
$anchor-resolved schema interns a malformed type ID) and #143 (siblings adjacent to a $ref on an
allOf branch are dropped).
An index built over resolution as it stands would bake those in and make them harder to reach. The
index is worth building once resolution is correct, not before.
Recorded in docs/micro-compiler-design.md §10 as deliberately out of scope, so that it is a
deferred decision with a reason rather than an omission.
Lowering currently rediscovers the shape of the source as it walks it. Indexing the raw tree once —
pointer to raw node plus a shape classification — would make reference resolution a lookup rather
than a walk, let cycle detection and alias-amplification refusal share the single walk they
currently duplicate, and give
morphic compile --explaina real substrate instead of re-derivingwhat it reports.
Why this is not being done yet
$refhandling carries open defects: #40 (percent-encoded fragments fail to resolve), #141 (an$anchor-resolved schema interns a malformed type ID) and #143 (siblings adjacent to a$refon anallOfbranch are dropped).An index built over resolution as it stands would bake those in and make them harder to reach. The
index is worth building once resolution is correct, not before.
Recorded in
docs/micro-compiler-design.md§10 as deliberately out of scope, so that it is adeferred decision with a reason rather than an omission.