You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this reference either generated from source code or used as the authoritative grammar for implementations? If it is merely notional, where can the authoritative protocol buffers grammar be found?
Debugging a .proto file parser leads to questions. The example file includes a message with an optional field:
A cursory reading of the grammar does not indicate that a normal field (i.e. not oneof or mapField) can have an "optional" label, and the "optional" literal is not included in the spec at all, though it appears seven times in examples.
This seems like a pretty basic problem that has existed through several schema versions. What EBNF production allows a message to have optional fields?
The text was updated successfully, but these errors were encountered:
It is neither generated from source nor the authoritative grammar for implementations. It's a best-effort representation of the grammar that we use.
Thanks for pointing out that some of our examples in the grammar topic for Editions 2023 include optional. The topic was a copy/paste/modify of the proto3 topic, and we missed some updates in the process.
Is this reference either generated from source code or used as the authoritative grammar for implementations? If it is merely notional, where can the authoritative protocol buffers grammar be found?
Debugging a .proto file parser leads to questions. The example file includes a message with an optional field:
A cursory reading of the grammar does not indicate that a normal field (i.e. not oneof or mapField) can have an "optional" label, and the "optional" literal is not included in the spec at all, though it appears seven times in examples.
This seems like a pretty basic problem that has existed through several schema versions. What EBNF production allows a message to have optional fields?
The text was updated successfully, but these errors were encountered: