FSharp.GrpcCodeGenerator icon indicating copy to clipboard operation
FSharp.GrpcCodeGenerator copied to clipboard

Protoc binaries seem to be different versions for different architectures

Open marner2 opened this issue 2 years ago • 2 comments

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 avatar Nov 18 '22 00:11 marner2

@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 avatar Nov 29 '22 20:11 marner2

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)

marner2 avatar Nov 30 '22 23:11 marner2