-
Notifications
You must be signed in to change notification settings - Fork 81
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
Unable to get pooling methods to gen #33
Comments
ok, I see now that I am supposed to use this option: https://github.com/planetscale/vtprotobuf/blob/main/testproto/pool/pool.proto#L7 Struggling to reference the |
Ok, I was able to get this to work by copying the My file structure:
And then I am referencing it from
Is there a better way to do this that doesn't involve forking |
@joe-elliott You can use |
Yes, that's how we run the compilation in Vitess itself. Just use the |
awesome, thx all! |
I've been unable to get these methods to compile, I've tried for type X in package y (no namespace/prefixing to do)
but no pool helpers - it does something though, it causes the Server/Client interface types to double-generate in both the .vt.pb files and the regular .pb files. Any chance of a super minimal example @vmg to help, or if @joe-elliott you could share a working example? I'm happy to return it back as a PR into the README.md if I can see it working. |
@steve-gray Vitess has been using that flag to generate our protos for a year now, and it's been working well for us. Here's a link to our Makefile: https://github.com/vitessio/vitess/blob/main/Makefile#L243-L253 You can see that the objects passed to the flag must contain their full package namespace. Does this help fix your issues? How can we make the documentation easier to follow? |
Under each "available feature" in the README you could include how to use it in the protoc option. |
I am currently attempting to put together a POC for using vtprotobuf in an application I work on. However the most promising feature (pooling) does not seem to exist in the generated code.
My command line:
The output files seem to be generated correctly and there are no errors:
But I'm not seeing
ResetVT
,ReturnVTToPool
, or*FromVTPool
generated. I have tried with 0.2.0 as well as tip of main. I have also tried not specifying--go-vtproto_opt
without luck.I am seeing
MarshalVT
,MarshalToVT
,SizeVT
,UnmarshalVT
, ... generated.Thanks for your time!
The text was updated successfully, but these errors were encountered: