namigop/FintX

Add support for includes

Closed this issue · 6 comments

I have two proto files in the same folder (a subfolder of my C# project named "Protos" like configured in the template).

One file ("tests.proto") includes the other by using import "Protos/baseTypes.proto";. This does work fine for code generation with GrpcTools, but FintX fails to find the included file when adding a client based on tests.proto:

INFO: Process done: protoc
Protos/baseTypes.proto: File not found.
tests.proto:6:1: Import "Protos/baseTypes.proto" was not found or had errors.
tests.proto:55:5: "Progress" is not defined.
ERROR: System.ArgumentNullException: Value cannot be null. (Parameter 'array')
at Tefin.Grpc.ServiceClient.compile@92-1.MoveNext() in /Users/erik/Work/Source/FintX/FintX/source/Tefin.Grpc/ServiceClient.fs:line 96
at Tefin.Features.CompileFeature.Run() in /Users/erik/Work/Source/FintX/FintX/source/Tefin/Features/CompileFeature.cs:line 38
at Tefin.ViewModels.Overlay.AddGrpcServiceOverlayViewModel.OnOkay() in /Users/erik/Work/Source/FintX/FintX/source/Tefin/ViewModels/Overlay/AddGrpcServiceOverlayViewModel.cs:line 161
at Tefin.ViewModels.ViewModelBase.<>c__DisplayClass10_0.<b__0>d.MoveNext() in /Users/erik/Work/Source/FintX/FintX/source/Tefin/ViewModels/ViewModelBase.cs:line 39

Note: The "Progress" message is defined in the included file.

Thanks for reporting. I'll check on it!

fix is in the main branch. Will close this ticket once the release is ready

I can confirm that my proto-file can now be opened fine 👍
Thanks a lot for the very fast fix (and for the tool in general)! 😄

I'm unable to use the app until this gets published.

For the moment, you can clone the repo, then run dotnet build. Or you also can open the solution in VS or Rider and compile it.

If you don't have dotnet, you can get it from MS (for free): https://dotnet.microsoft.com/en-us/download