-
Notifications
You must be signed in to change notification settings - Fork 229
Update buf plugin with latest v2 beta #608
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
Comments
Hey, to get around this, I did an extra step on top of
You're likely also going to need Then, in my custom generate script, I did this:
Hope that helps! |
Thank you @JitPackJoyride. |
any take on this? Will Buf include pre-released commits? or make any exception on libraries like betterproto for beta releases? |
👍 here. I would also like to use betterproto with |
same issue here - the current version on buf isn't working anymore - any eta on when we will be releasing the latest version in buf plugins ? |
Same issue here. Would love to use the 2.0 pre-release with buf |
You can work around this by vendoring betterproto yourself to your path. Buf is still handling almost everything outside of supplying the plugin. # pyproject.toml
dependencies = [
"betterproto[compiler]>=2.0.0b6",
] # buf.gen.yaml
version: v2
clean: true
plugins:
- local: protoc-gen-python_betterproto
out: src/proto
inputs:
- directory: ../protos All you have to do is
|
Summary
Buf uses 1.2.5 of betterproto package, which cannot process
optional
keywordsWhat is the feature request for?
The core library
The Problem
In our company we have a standard to use buf to generate bindings to proto files.
And we wanted to use betterproto plugin to generate idiomatic python code.
Unfortunately, the only version of the plugin (v1.2.5) doesn't support some "newer" protobuf features, like "optional" keyword.
This was fixed in v.2.0.0b4, but this release is not available in buf.
The Ideal Solution
Can I ask to release latest beta (v.2.0.0b7 as the time of writing) as another version of community plugin?
https://github.com/danielgtaylor/python-betterproto/milestone/4 does not seem to be forthcoming.
Thanks
The Current Solution
Rely on official buf python plugin
https://buf.build/protocolbuffers/python?version=v28.0
The text was updated successfully, but these errors were encountered: