Add plugin option elide_plugin_version=true#1336
Conversation
|
The PR is nice, but is it the right thing to do? I think this information is useful, and I would expect users to either not commit generated files or ignore the diff (for example, on github, with |
We use Bazel for building and not updating files for which content doesn't change will ensure build actions don't need to run again. So even without checking things in this would save build time. |
Ideally, we'd generate code that's perfect for every use case - unfortunately, that's impossible because of mutually exclusive requirements. The next best solution would be to provide options to modify the generated code for every use case - unfortunately, that makes the project unmaintainable. That's why we need to be judicious regarding new plugin options (as explained in the FAQ). But the goal for protobuf-es is still to be as useful and convenient as possible. This plugin option isn't without drawbacks, but I believe that it fits the bill. |

This PR adds a new plugin option to @bufbuild/protoc-gen-es (and all plugins based on @bufbuild/protoplugin):
Closes #1294