Skip to content

spec: RFC-001 contextual keywords + mark M1 kickoff complete - #79

Merged
trendvidia merged 3 commits into
mainfrom
m1-kickoff-doc
Jun 16, 2026
Merged

spec: RFC-001 contextual keywords + mark M1 kickoff complete#79
trendvidia merged 3 commits into
mainfrom
m1-kickoff-doc

Conversation

@trendvidia

Copy link
Copy Markdown
Owner

Summary

Two RFC-001 documentation/spec updates:

  1. RFC-001 contextual keywords — no soft-break for v1.2 (e441cea). type, function, annotation become 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. Updates STABILITY.md, CHANGELOG.md, docs/RFC-001-schema-extensions.md, and IETF draft -01.

  2. Mark M1 kickoff complete (992ecf7). The M1 (parser + IR + linker + descriptor lowering) work for RFC-001 has landed in trendvidia/protocompile. Adds a Status section to docs/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.

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
trendvidia merged commit 0f8b870 into main Jun 16, 2026
4 checks passed
@trendvidia
trendvidia deleted the m1-kickoff-doc branch June 16, 2026 09:28
trendvidia added a commit that referenced this pull request Jun 16, 2026
The 50100->50400 canonicalization (#78) landed in STABILITY.md, the proto,
and the RFC docs, but the matching CHANGELOG edit was dropped in a merge
conflict with #79. Bring CHANGELOG line in sync with the rest of main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant