ni / grpc-labview

gRPC client and server support for LabVIEW
MIT License
90 stars 62 forks source link

Unable to generate library from proto if there are duplicated import files #385

Open arevh opened 1 month ago

arevh commented 1 month ago

When more than one proto files are provided to the gRPC Template Creation Utility, which both include the same imported file, the Utility is not being able to build the library and stops its execution with the following error.

Error 1357 occurred at Invoke Node in gRPC Template Creation Utility-release.lvlib:Create OneOf Accessors.vi->gRPC Template Creation Utility-release.lvlib:Create OneOf Field Accessors.vi->gRPC Template Creation Utility-release.lvlib:Create Data Clusters for Types.vi->gRPC Template Creation Utility-release.lvlib:Main.vi

Toolkit version: 1.2.5.1 LabVIEW version 2020 64-bit

The issue was solved after the gRPC Template Creation Utility was modified to remove duplicated instances, as shown in the snippet below.

image

AB#2866048

yash-ni commented 1 month ago

Hi @arevh, I appreciate your efforts in addressing this issue. Could you also provide the sample proto files that are causing the problem?

arevh commented 1 month ago

Hi @yash-ni ,

Please see attached the proto files. Unfortunately it takes approximately 4 hours to build until it stops with the error. BTW with the suggested modification in the code the build time reduced to 1.5h. Proto.zip

As a top level these protos are provided: control_stage, data_flow, rule, tare, teds, test.

Thanks, Arev

yash-ni commented 1 month ago

BTW with the suggested modification in the code the build time reduced to 1.5h.

Great! Feel free to create a PR with your changes, we will review it :)

arevh commented 1 month ago

I've tried to open the PR, but it is not allowing me, as I'm not a collaborator.

jasonmreding commented 1 month ago

FYI, if you don't have write access to the mainline branch, you can still fork the repo and then submit a pull request from your fork to the mainline. Somebody with write access will eventually have to commit it on your behalf (presumably one of the reviewers) once the PR has been approved and all required checks have passed.