-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add configuration option to generate the binary proto descriptor #506
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Thanks so much for putting the time and effort into this!
Added a few comments, nothing major though.
protobuf-maven-plugin/src/it/protoc-descriptor-file/selector.groovy
Outdated
Show resolved
Hide resolved
...en-plugin/src/main/java/io/github/ascopes/protobufmavenplugin/mojo/AbstractGenerateMojo.java
Outdated
Show resolved
Hide resolved
...main/java/io/github/ascopes/protobufmavenplugin/protoc/ProtocArgumentFileBuilderBuilder.java
Outdated
Show resolved
Hide resolved
...-plugin/src/it/protoc-descriptor-file/src/test/java/org/example/helloworld/ProtobufTest.java
Outdated
Show resolved
Hide resolved
...rc/main/java/io/github/ascopes/protobufmavenplugin/generation/ProtobufBuildOrchestrator.java
Outdated
Show resolved
Hide resolved
...plugin/src/main/java/io/github/ascopes/protobufmavenplugin/generation/GenerationRequest.java
Show resolved
Hide resolved
In |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #506 +/- ##
=======================================
Coverage 87.54% 87.54%
=======================================
Files 40 40
Lines 1300 1300
Branches 88 88
=======================================
Hits 1138 1138
Misses 121 121
Partials 41 41
|
…mavenplugin/mojo/AbstractGenerateMojo.java Co-authored-by: Ashley <73482956+ascopes@users.noreply.github.com>
...en-plugin/src/main/java/io/github/ascopes/protobufmavenplugin/mojo/AbstractGenerateMojo.java
Show resolved
Hide resolved
I've just updated the CI pipeline... if you rebase onto the main branch, it should hopefully run the pipeline for you on this PR without me approving it each time first... hopefully. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Extends GH-506 with support for descriptor configuration parameters that can be passed to protoc. - Add three new options: - outputDescriptorIncludeImports - pass the --include_imports flag to protoc. - outputDescriptorIncludeSourceInfo - pass the --include_source_info flag to protoc. - outputDescriprorRetainOptions - pass the --retain_options flag to protoc. - Moved the documentation for descriptor files to a separate location. - Fixed an edge case where incremental compilation could cause inconsistent descriptor file outputs. Enabling descriptor files will now disable incremental compilation.
Ciao,
this PR adds an optional descriptorFile parameter which, if present, indicates the file to which the proto file description is to be saved.
Adds the --descriptor_set_out=FILE option to the protoc command.
Regards,
Luca