-
Notifications
You must be signed in to change notification settings - Fork 124
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
support ScalaPB package/file-level customization #1253
Conversation
Thank you for your pull request! After a quick sanity check one of the team will reply with 'OK ΤO ΤESΤ' to kick off our automated validation on Jenkins. This compiles the project, runs the tests, and checks for things like binary compatibility and source code formatting. When two team members have also manually reviewed and (perhaps after asking for some amendments) accepted your contribution, it should be good to be merged. For more details about our contributing process, check out CONTRIBUTING.md - and feel free to ask! |
4a2f727
to
7c46a20
Compare
OK TO TEST |
Indeed the Akka gRPC code generation currently only allows changing |
7c46a20
to
15087df
Compare
$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/HelloRequest.scala | ||
$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/HelloworldProto.scala | ||
$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/GreeterService.scala | ||
> compile |
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.
just force-pushed as I had forgotten this...
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.
Nice that we're getting this.
(discussion for a separate PR/issue): I wonder if should eventually deprecate and remove the use of flat_package
out of the box. We would then fallback to scalapb's behavior and transparently use the options available there.
I am not sure it will be required. ScalaPB has promising upcoming changes that will make consumption of JAR-packaged Scala stubs compiled with different options than the generator ones used for the local project seamless. See scalapb/scalapb-validate#70 & scalapb/ScalaPB#873 for related discussions. |
The motivation of my comment was to eventually remove from akka-gRPC any access to scalaPB settings since those scalaPB settings are already available via options in the So users no longer need to specify Again, I'd rather discuss these further improvements on a separate issue/PR since I'm sure there'll be use cases that require more attention. |
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.
Great! Would love to take into account the flat_package
option better in the Akka gRPC codegen side but that's for another PR, this is already a great improvement.
See https://scalapb.github.io/docs/customizations
On master, code won't compile if package/file-level options are used to change
flat_package
as only ScalaPB honors the request.