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 protopluginutil.StripSourceRetentionOptions #14

Merged
merged 1 commit into from
Mar 23, 2024

Conversation

bufdev
Copy link
Member

@bufdev bufdev commented Mar 23, 2024

This ports StripSourceRetentionOptions from github.com/bufbuild/protocompile at https://github.com/bufbuild/protocompile/tree/main/options. We had wanted to stick this function somewhere public, and at the time, protocompile was the best option we had. Now, we have a plugin-specific package. This function will also be used in the upcoming protoplugintest package to make it easy to test plugin implementations.

Light edits were made, mostly in service of making the code pass the golangci-lint configuration in this repository.

Sticking this in a new protopluginutil package for now until we figure out the final shape of this repository. I don't think this should live in the main package - we want to make it plugin-authoring specific. Right now, I envision us having:

  • protoplugin - author Protobuf plugins
  • protoplugintest - test plugins authored with protoplugin
  • protopluginutil - useful utilities used by protoplugin and protoplugintest that may have a wider audience. This includes StripSourceRetentionOptions, but also likely ValidateCodeGeneratorRequest, ValidateAndNormalizeCodeGeneratorResponse, and likely a new BuildCodeGeneratorRequest.

@bufdev bufdev requested a review from mfridman March 23, 2024 18:03
@bufdev bufdev changed the title Add protopluginutil.StripSourceRetentioOptions Add protopluginutil.StripSourceRetentionOptions Mar 23, 2024
@bufdev bufdev merged commit 402cf9d into main Mar 23, 2024
8 checks passed
@bufdev bufdev deleted the source-retention-options branch March 23, 2024 22:33
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.

2 participants