Skip to content
New issue

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

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

Already on GitHub? # to your account

Add an option to insert build tags into generated files #634

Closed
howardjohn opened this issue Sep 16, 2022 · 2 comments
Closed

Add an option to insert build tags into generated files #634

howardjohn opened this issue Sep 16, 2022 · 2 comments
Labels
Feature Request Requesting a new feature be added Go Go language support Wont Fix Out of scope of this project

Comments

@howardjohn
Copy link
Contributor

Currently, validate.go functions make a substantial amount of our binary size, which we would like to reduce. In fact, we don't even call .Validate() at all in our code - so it is all wasted space.

It would be great to have the ability to add a build tag to the generated files. Then, libraries could insert a build: !disible-protoc-gen-validate or similar to allow opting out.


Note: the obvious question is "why not just NOT use the plugin?". The reason is we are depending on importing other's libraries (in this case, Envoy). We also cannot just generate our own protos instead of theirs, as there must be only 1 definition in the final compiled binary, and Envoy protos are used by tons of other dependencies.

@howardjohn
Copy link
Contributor Author

howardjohn commented Oct 4, 2022 via email

@elliotmjackson elliotmjackson reopened this Oct 5, 2022
@rodaine rodaine added Go Go language support Feature Request Requesting a new feature be added labels Apr 20, 2023
@elliotmjackson elliotmjackson added the Wont Fix Out of scope of this project label Aug 10, 2023
@elliotmjackson
Copy link
Contributor

elliotmjackson commented Aug 10, 2023

FYI Looking ahead, I want to let you know that we're shifting our focus towards protovalidate, which naturally eliminates the need for this feature.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Feature Request Requesting a new feature be added Go Go language support Wont Fix Out of scope of this project
Projects
None yet
Development

No branches or pull requests

3 participants