Skip to content
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 Java options for a correct generation #295

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
3 changes: 3 additions & 0 deletions src/blockchain_region_param_v1.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
syntax = "proto3";

package helium;
option java_package = "com.helium.grpc";
option java_outer_classname = "regionparam";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regionparam and not RegionParam?

Copy link
Contributor

@jeffgrunewald jeffgrunewald Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or IotRegionParam for consistency with the region.proto outer class name?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, the generation is not working properly when you name it correctly. I do not remind the detail of the problem but it was not working with camelcase and upfront uppercase

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how was the problem exhibited? At build time? If so, I would still like to see a CI step, just like we do for all other supported languages

option java_multiple_files = true;

message blockchain_region_params_v1 {
repeated blockchain_region_param_v1 region_params = 1;
Expand Down
3 changes: 3 additions & 0 deletions src/data_rate.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
syntax = "proto3";

package helium;
option java_package = "com.helium.grpc";
option java_outer_classname = "PocLoRa";
option java_multiple_files = true;

enum data_rate {
SF12BW125 = 0;
Expand Down
3 changes: 3 additions & 0 deletions src/region.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
syntax = "proto3";

package helium;
option java_package = "com.helium.grpc";
option java_outer_classname = "IotRegion";
option java_multiple_files = true;

enum region {
US915 = 0;
Expand Down
3 changes: 3 additions & 0 deletions src/service/iot_config.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
syntax = "proto3";

package helium.iot_config;
option java_package = "com.helium.grpc";
option java_outer_classname = "IotConfig";
option java_multiple_files = true;

import "blockchain_region_param_v1.proto";
import "region.proto";
Expand Down
3 changes: 3 additions & 0 deletions src/service/poc_lora.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
syntax = "proto3";

package helium.poc_lora;
option java_package = "com.helium.grpc";
option java_outer_classname = "PocLoRa";
option java_multiple_files = true;

import "data_rate.proto";

Expand Down