spec: finalize Literal carrier shape (RFC-001 §8.1) - #99
Merged
Conversation
This was referenced Jul 16, 2026
trendvidia
added a commit
that referenced
this pull request
Jul 16, 2026
trendvidia
force-pushed
the
spec/063-streaming-contract
branch
from
July 16, 2026 06:19
6efd03d to
c64d71b
Compare
trendvidia
force-pushed
the
spec/064-literal-shape
branch
2 times, most recently
from
July 16, 2026 06:24
2cadb16 to
3c7dc84
Compare
trendvidia
added a commit
that referenced
this pull request
Jul 16, 2026
trendvidia
force-pushed
the
spec/063-streaming-contract
branch
from
July 16, 2026 06:24
c64d71b to
7d03e8c
Compare
trendvidia
force-pushed
the
spec/064-literal-shape
branch
from
July 16, 2026 06:30
3c7dc84 to
97d22a1
Compare
trendvidia
added a commit
that referenced
this pull request
Jul 16, 2026
trendvidia
force-pushed
the
spec/063-streaming-contract
branch
from
July 16, 2026 06:30
7d03e8c to
8f45f66
Compare
trendvidia
added a commit
that referenced
this pull request
Jul 16, 2026
trendvidia
force-pushed
the
spec/063-streaming-contract
branch
from
July 16, 2026 06:36
8f45f66 to
a203f09
Compare
trendvidia
force-pushed
the
spec/064-literal-shape
branch
from
July 16, 2026 06:36
97d22a1 to
32281cf
Compare
Resolves spec issue #15 (GH #64). In-place revision of the unreleased carrier — the deliberate pre-freeze window for wire-shape changes. - EnumLiteral {enum_type, value_name, number}: enum references lower RESOLVED; consumers never re-resolve bare names against a pool (replaces string enum_name). - ListLiteral becomes repeated LiteralValue: elements are values, not arguments — no names, no expressions representable; homogeneous kind required (same enum_type for enum elements); nesting legal. - Message literals stay google.protobuf.Any, with the explicit-typing rule pinned: type from the param declaration or an explicit use-site type name, never inferred from value shape; source spelling deferred to the IETF draft (#3). - RFC-001 §8.1 excerpt + lowering rules prose; §13 row 6 resolved; CHANGELOG notes the protocompile descriptor.pb.go re-vendor follow-up. - Fixtures: 10_literal_args.proto (schema-text: enum ref + list on any-typed params) and 11_literal_carrier_golden.textproto (lowered AnnotationList, all three kinds, protoc encode/decode-verified).
trendvidia
force-pushed
the
spec/064-literal-shape
branch
from
July 16, 2026 06:45
32281cf to
aa00639
Compare
trendvidia
added a commit
that referenced
this pull request
Jul 16, 2026
trendvidia
added a commit
that referenced
this pull request
Jul 16, 2026
* spec: finalize Literal carrier shape (RFC-001 §8.1) Resolves spec issue #15 (GH #64). In-place revision of the unreleased carrier — the deliberate pre-freeze window for wire-shape changes. - EnumLiteral {enum_type, value_name, number}: enum references lower RESOLVED; consumers never re-resolve bare names against a pool (replaces string enum_name). - ListLiteral becomes repeated LiteralValue: elements are values, not arguments — no names, no expressions representable; homogeneous kind required (same enum_type for enum elements); nesting legal. - Message literals stay google.protobuf.Any, with the explicit-typing rule pinned: type from the param declaration or an explicit use-site type name, never inferred from value shape; source spelling deferred to the IETF draft (#3). - RFC-001 §8.1 excerpt + lowering rules prose; §13 row 6 resolved; CHANGELOG notes the protocompile descriptor.pb.go re-vendor follow-up. - Fixtures: 10_literal_args.proto (schema-text: enum ref + list on any-typed params) and 11_literal_carrier_golden.textproto (lowered AnnotationList, all three kinds, protoc encode/decode-verified). * docs: record S1 resolutions (#11–#16) in RFC-001-issues.md Ticks the six open-question boxes and adds a resolution record to each section — GH #60–#65, PR train #94–#99 — with pointers to the follow-up trackers (protocompile#67/#68, GH #102/#103) and the fixtures 07–11.
3 tasks
trendvidia
added a commit
that referenced
this pull request
Jul 16, 2026
* spec: pin message-literal source grammar (RFC-001 §5.1, #102) Expands the `literal` production left open in RFC-001 §5.1 and IETF draft -01 (follow-up from #64 / PR #99, which pinned the carrier): - messageLiteral: optional type name + braced colon-separated field inits — name REQUIRED when the param/field is `any`, OPTIONAL and verified otherwise; never inferred from shape - listLiteral EBNF (used by fixture 10 but previously unpublished) - tight subset, not full textformat: mandatory colon + commas, no trailing comma, fields at most once, repeated via list literals, maps deferred - draft -01: ABNF additions, new Literal Values section, resolved open-issue bullet dropped - grammar.ebnf: schema-extension section (with PXF-divergence notes) - fixture 10 gains the Money message-literal use site; golden 11 locations synced Closes #102 * docs: record #15 source-spelling resolution (GH #102, PR #108)
This was referenced Jul 16, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #64 (spec item #15). Stacked on #98 (train: #94 → #95 → #96 → #97 → #98 → this); merge in order.
What
Replaces the placeholder
Literalindescriptor.proto— the one bundle item that changes an existing wire shape, done now precisely because the carrier is unreleased and ratification (#56) freezes it:EnumLiteral {enum_type, value_name, number}replacesstring enum_name: enum references lower resolved — downstream consumers (protocheck, OpenAPI, codegen) never repeat linker work against a descriptor pool.ListLiteral { repeated LiteralValue }replacesrepeated AnnotationArg: elements are values, not arguments — the name andExpressionjunk states become unrepresentable. Homogeneous kind required (sameenum_typefor enum elements); mixed lists are compile errors; nesting legal. (this in [...]is unaffected — that whole rule is one opaqueExpression.)google.protobuf.Any, with the explicit-typing rule pinned: type from the param's declared type or an explicit use-site type name when the param isany— never inferred from value shape. Source-level spelling stays with the IETF draft (deps(actions): bump github/codeql-action from 3 to 4 #3).10_literal_args.proto(schema-text: enum ref + list literal) and11_literal_carrier_golden.textproto(loweredAnnotationListcovering all three kinds — protoc encode/decode-verified today, 334-byte binary).Blast radius
Wire-breaking for the carrier by design, in the pre-freeze window: protocompile's shipped M1 lowering has no grammar path emitting enum/message/list annotation args yet (fixtures 01–06 contain none), so nothing emitted today changes. Follow-up: protocompile re-vendors
descriptor.pb.go(same coordination pattern as the #35descriptor_pathbump).