Skip to content

Generator refactors: a BindingContext record and a UnionDispatchEmitter #204

Open

Description

@Blind-Striker

What

  • SchemaAliasValidator and CurationValidator pass growing parameter clumps; extract a shared
    BindingContext record.
  • tools/OpenCode.Sdk.Tools/Generator/Emission/UnionEmitter.cs is 1,046 lines; extract its
    marker-table and converter-dispatch half into a UnionDispatchEmitter.
  • Trigger-gated: the two remaining binding-locality extractions, a binder test fixture derived from
    real scenarios and error-union binding moved into its own binder, wait until a generator change
    needs them.

The proof for each is an unchanged generated output.

Why it waits for 1.1

Internal refactors with no generated or public change.

Evidence

  • tools/OpenCode.Sdk.Tools/Generator/Binding/SchemaAliasValidator.cs,
    tools/OpenCode.Sdk.Tools/Generator/Binding/CurationValidator.cs,
    tools/OpenCode.Sdk.Tools/Generator/Emission/UnionEmitter.cs.
  • docs/ROADMAP.md:165-166 (Open Questions: the remaining binding-locality extractions).

Done when

  • The two extractions land with generate --verify byte-identical and the tool tests green.
  • The binding-locality row lands with the generator change that needs it, or closes with a reason.

Depends on

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions