Skip to content

protocompile: re-vendor descriptor.pb.go against the finalized Literal carrier #67

Description

@trendvidia

Follow-up from trendvidia/protowire#64 (PR trendvidia/protowire#99, spec/064-literal-shape).

That PR revises the Literal carrier in protowire's proto/schema/v1/descriptor.proto in place (pre-freeze window):

  • string enum_name = 1EnumLiteral enum_value = 1 ({enum_type, value_name, number}, linker-resolved)
  • ListLiteral.elements: repeated AnnotationArgrepeated LiteralValue (scalar oneof mirroring AnnotationArg 10–14 + nested Literal; homogeneous kind enforced)
  • Message literals unchanged (google.protobuf.Any), explicit-typing rule pinned

protocompile's lowering (fdp/annotations.go) emits against a vendored descriptor.pb.go — it must be regenerated from the revised carrier once the protowire PR train (trendvidia/protowire#94#99) merges.

Blast radius today is nil: no shipped grammar path emits enum/message/list annotation args (protowire fixtures 01–06 contain none). When the grammar grows those paths, lowering must also implement the new normative checks: resolved enum emission, list homogeneity rejection, explicit message-literal typing.

Conformance target: protowire testdata/schema-extensions/11_literal_carrier_golden.textproto (and 10_literal_args.proto for the source forms).

Blocked on: trendvidia/protowire#99 merging.

Acceptance criteria:

  • Vendored descriptor.pb.go regenerated from the revised descriptor.proto.
  • fdp/annotations.go compiles against it; existing lowering round-trips (fixtures 01–06) unchanged.
  • Lowering for the new variants (when grammar paths exist) produces a carrier semantically equal to 11_literal_carrier_golden.textproto.

Metadata

Metadata

Assignees

No one assigned

    Labels

    rfc-001Protowire v1.2.0 schema extensions

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions