Document the in-memory options encoding contract on fdp - #115
Merged
Conversation
User-written options serialize into unknown-field bytes for protoc byte parity, so typed accessors on in-memory descriptors read as unset until a marshal/unmarshal round-trip; the schema carriers and map_entry are the typed exemptions. This was previously recorded only in #113's commit message. Fixes #114.
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.
Fixes #114 (option 1 — document the contract; normalization deferred until a concrete in-memory consumer needs it).
Adds a package-doc section on
fdpspelling out that user-written options (deprecated, features, custom options) live in unknown-field bytes on in-memory descriptors — typed accessors andproto.GetExtensionread as unset until aproto.Marshal/Unmarshalround-trip — with the two typed exemptions (protowire.schema.v1 carriers,map_entryon synthetic entries per #113), plus a short pointer onDescriptorProtoitself. The*Bytesentry points are called out as unaffected since parsing performs the fold.Doc-only; no behavior change.