spec: RFC-001 contextual keywords + mark M1 kickoff complete - #79
Merged
Conversation
Amends RFC-001 to make `type`, `function`, and `annotation`
contextual keywords — recognized only at the start of a top-level
declaration; accepted as identifiers everywhere else. Removes the
soft-break that the original v1.2 reservation would have introduced.
Discovery driving the change: implementation pre-flight surfaced
`oneof type { ... }` in Google's Cloud DLP API schema (Apache 2.0,
vendored in protocompile/parser/testdata/largeproto.proto, 8
occurrences) and many production schemas. Hard-reserving the words
would break wide swaths of real-world protobuf code, including
Google's own APIs. Contextual keywords preserve every v1.1 schema
unchanged.
Also drops the spurious reservations of `expression` (only meaningful
in annotation-parameter-type position) and `this` (only inside
engine-language bodies, which protocompile captures opaquely). Reduces
the touched-tokens count from 5 to 3.
Pattern is well-precedented — Java 9 added `module`, `requires`,
`exports`, `opens`, `to`, `with` as contextual keywords for exactly
this reason.
Files:
- docs/RFC-001-schema-extensions.md contextual-keyword design + rationale
- docs/draft-trendvidia-protowire-01.md Reserved Keywords + ABNF appendix
- STABILITY.md no source-level incompatibility for v1.2
- CHANGELOG.md updated v1.2.0 notes
- docs/M1-kickoff-protocompile.md PR 1 scope adjusted to 3 keywords +
contextual-keyword grammar bridge;
estimate revised 1-2 days -> 2-3 days
Bundled into this PR (was originally just the kickoff doc) because the
kickoff scope only makes sense after the amendment; reviewing them as
one is cleaner than two sequential PRs against an unmerged base.
M1 (parser + IR + linker + descriptor lowering) for RFC-001 is done in the trendvidia/protocompile fork. Add a Status section noting completion, record that the work landed via the experimental pipeline (not the five legacy-parser PRs originally scoped), and map each RFC-001 capability to its protocompile PR (#50-#62 + source-map-type-refinement).
trendvidia
added a commit
that referenced
this pull request
Jun 16, 2026
This was referenced Jul 16, 2026
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.
Summary
Two RFC-001 documentation/spec updates:
RFC-001 contextual keywords — no soft-break for v1.2 (
e441cea).type,function,annotationbecome contextual keywords (recognized only at the start of a top-level declaration; accepted as identifiers everywhere else), so v1.2 introduces no source-level incompatibility. Existing schemas using these words as message/oneof/field/enum-value names remain valid. UpdatesSTABILITY.md,CHANGELOG.md,docs/RFC-001-schema-extensions.md, and IETF draft-01.Mark M1 kickoff complete (
992ecf7). The M1 (parser + IR + linker + descriptor lowering) work for RFC-001 has landed intrendvidia/protocompile. Adds a Status section todocs/M1-kickoff-protocompile.md, records that the work landed via the experimental pipeline (not the five legacy-parser PRs originally scoped), and maps each RFC-001 capability to its protocompile PR.Note
This is the base for the follow-on extension-number canonicalization (#78), which stacks on this branch. Merging this first lets #78 retarget cleanly to
main.