You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside my proto files, I used option java_package = "ValidationService.proto" to specify that I want the generated classes to be placed inside the proto package, but protoc creates another folder/package insideValidationService. This results in the following constellation:
project_root
lib
src
foo_package_1
foo_package_2
ValidationService
ValidationService
proto
ValidationRequest.java
ValidationService.java
Furthermore, the package inside ValidationRequest.java is untruly set to ValidationService.proto, so this doesn't even represent the real project structure. If I restrict the java_package option to proto, the classes are placed accurately inside the proto folder, but the package description inside the source code is wrong again (since it only refers to package proto; instead of package ValidationService.proto;).
If this is a bug and not just my inability to use the java_package option correctly, I would suggest more control for the user to specify path and package separately by using more than one parameter.
Regards
The text was updated successfully, but these errors were encountered:
…shalers (protocolbuffers#656)
PR protocolbuffers#650 added a check to error out when a custom marshaler was called and
deterministic marshaling was also specified.
That change performed the check in a relatively obscure location that did not
catch all code paths. Since determinism can only be enabled on the Buffer type,
we check it up front in Buffer.Marshal.
Also, change the test to avoid code injection into generated sources.
I have the following project structure (Java):
Inside my proto files, I used
option java_package = "ValidationService.proto"
to specify that I want the generated classes to be placed inside theproto
package, but protoc creates another folder/package insideValidationService
. This results in the following constellation:Furthermore, the package inside
ValidationRequest.java
is untruly set toValidationService.proto
, so this doesn't even represent the real project structure. If I restrict thejava_package
option toproto
, the classes are placed accurately inside theproto
folder, but the package description inside the source code is wrong again (since it only refers topackage proto;
instead ofpackage ValidationService.proto;
).If this is a bug and not just my inability to use the
java_package
option correctly, I would suggest more control for the user to specify path and package separately by using more than one parameter.Regards
The text was updated successfully, but these errors were encountered: