Every compiler derives IR identifiers, and all three currently do it independently: ids.go exists
in compilers/openapi, in the GraphQL draft (#20), and in the Protobuf draft (#21). What they must
agree on is the grammar — the t/..., op/..., p/... prefixes, and the rule that a minted node
occupies a namespace no source pointer can produce (invariant 3's corollary).
What they must not share is the derivation: a JSON Pointer, a GraphQL path and a protobuf
fully-qualified name are different things and stay in their own compilers.
What to do
Move the grammar and the namespace rule into compilers/compile. Leave OpenAPI pointer arithmetic
and the pointer-to-ID derivation in compilers/openapi.
Acceptance
compilers/openapi derives no identifier except through the framework, and golden output is
byte-identical — this is a move, not a behaviour change.
Part of docs/micro-compiler-design.md §3, and half of #73.
Every compiler derives IR identifiers, and all three currently do it independently:
ids.goexistsin
compilers/openapi, in the GraphQL draft (#20), and in the Protobuf draft (#21). What they mustagree on is the grammar — the
t/...,op/...,p/...prefixes, and the rule that a minted nodeoccupies a namespace no source pointer can produce (invariant 3's corollary).
What they must not share is the derivation: a JSON Pointer, a GraphQL path and a protobuf
fully-qualified name are different things and stay in their own compilers.
What to do
Move the grammar and the namespace rule into
compilers/compile. Leave OpenAPI pointer arithmeticand the pointer-to-ID derivation in
compilers/openapi.Acceptance
compilers/openapiderives no identifier except through the framework, and golden output isbyte-identical — this is a move, not a behaviour change.
Part of
docs/micro-compiler-design.md§3, and half of #73.