Skip to content

Document the in-memory options encoding contract on fdp - #115

Merged
trendvidia merged 1 commit into
trendvidiafrom
fdp-options-doc
Jul 24, 2026
Merged

Document the in-memory options encoding contract on fdp#115
trendvidia merged 1 commit into
trendvidiafrom
fdp-options-doc

Conversation

@trendvidia

Copy link
Copy Markdown
Owner

Fixes #114 (option 1 — document the contract; normalization deferred until a concrete in-memory consumer needs it).

Adds a package-doc section on fdp spelling out that user-written options (deprecated, features, custom options) live in unknown-field bytes on in-memory descriptors — typed accessors and proto.GetExtension read as unset until a proto.Marshal/Unmarshal round-trip — with the two typed exemptions (protowire.schema.v1 carriers, map_entry on synthetic entries per #113), plus a short pointer on DescriptorProto itself. The *Bytes entry points are called out as unaffected since parsing performs the fold.

Doc-only; no behavior change.

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.
@trendvidia
trendvidia merged commit cff2cf8 into trendvidia Jul 24, 2026
1 check passed
@trendvidia
trendvidia deleted the fdp-options-doc branch July 24, 2026 04:26
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.

fdp: user-written options are invisible to typed accessors on the in-memory FDP — document or normalize

1 participant