Arshia001 / FSharp.GrpcCodeGenerator

A protoc plugin to enable generation of F# code + supporting libraries
MIT License
81 stars 9 forks source link

Protoc binaries seem to be different versions for different architectures #20

Open marner2 opened 1 year ago

marner2 commented 1 year ago

I got error : This file contains proto3 optional fields, but --experimental_allow_proto3_optional was not set. when trying to build a project using this dependency on a linux Docker container. Looking at the protoc directory, linux_x64 and macos_x86 both seem to be much older than the rest of them.

Can these be updated so the build passes on linux?

Thanks.

marner2 commented 1 year ago

@Arshia001 Do you have any preferences on this? Can we merge the related PR? This is blocking for linux build lines without a workaround that I can see.

marner2 commented 1 year ago

I found a workaround. If you install protoc version at least 3.15 to /usr/local/bin/protoc and add -p:PROTOBUF_PROTOC=/usr/local/bin/protoc to the dotnet build command like so:

dotnet build -p:PROTOBUF_PROTOC=/usr/local/bin/protoc

This will work (tested in docker)