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

Rewrite using protogen #22

Merged
merged 1 commit into from
Jul 19, 2022
Merged

Rewrite using protogen #22

merged 1 commit into from
Jul 19, 2022

Conversation

wdullaer
Copy link
Contributor

This PR rewrites the plugin using the protogen framework rather than protoc-gen-star.

This brings a number of benefits:

  • Removes the dependency on the deprecated github.com/golang/protobuf package
  • Provides gomodule aware config options on how to generate code
  • Consistent API with most modern go-protoc plugins
  • Considerable reduction in LOC

Given that this is a very invasive change to the plugin, I completely understand if you do not want to merge. In this scenario, I will continue maintaining this under my own namespace as an alternative implementation.

The main driver for the change is the gomodule aware config options that using protogen brings.

@kei2100
Copy link
Owner

kei2100 commented Jul 19, 2022

Thank you for your PR.

Your proposal makes sense and the code quality is excellent, so I'll incorporate the content of this PR.

However, I would like to use the same file names as before for the generated files, so I would like to make those changes and then create a new release over the weekend.

※ e.g. simple_marshall_zap.pb => simple.pb.marshall-zap.go

Many thanks!

@kei2100 kei2100 merged commit 1470ec6 into kei2100:master Jul 19, 2022
@kei2100 kei2100 mentioned this pull request Jul 24, 2022
kei2100 added a commit that referenced this pull request Jul 24, 2022
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