Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function for stripping source retention options from a descriptor #250

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

jhump
Copy link
Member

@jhump jhump commented Mar 7, 2024

This adds a helper function to the options sub-package that can strip "source retention" options from a descriptor. These are options that should only be retained in the descriptor in source form -- like when manipulated by a compiler or code generator -- and should not be present at runtime. Stripping these options results in a descriptor that could safely be embedded in generated code.

Copy link
Member

@bufdev bufdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jhump jhump merged commit 8727154 into main Mar 7, 2024
9 checks passed
@jhump jhump deleted the jh/strip-source-options branch March 7, 2024 16:09
kralicky added a commit to kralicky/protocompile that referenced this pull request Apr 1, 2024

Verified

This commit was signed with the committer’s verified signature.
kralicky Joe Kralicky
…bufbuild#250)

This adds a helper function to the `options` sub-package that can strip
"source retention" options from a descriptor. These are options that
should only be retained in the descriptor in source form -- like when
manipulated by a compiler or code generator -- and should not be present
at runtime. Stripping these options results in a descriptor that could
safely be embedded in generated code.

(cherry picked from commit 8727154)
kralicky pushed a commit to kralicky/protocompile that referenced this pull request Apr 12, 2024

Verified

This commit was signed with the committer’s verified signature.
kralicky Joe Kralicky
…bufbuild#250)

This adds a helper function to the `options` sub-package that can strip
"source retention" options from a descriptor. These are options that
should only be retained in the descriptor in source form -- like when
manipulated by a compiler or code generator -- and should not be present
at runtime. Stripping these options results in a descriptor that could
safely be embedded in generated code.

(cherry picked from commit 8727154)
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.

None yet

2 participants