Skip to content

compilers/openapi: index the source tree once instead of rediscovering it #179

Description

@OmarAlJarrah

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions