I was following the official tutorial on how to import an existing schema, but I ran into trouble because I used a more recent protobuf version.
I first installed protobuf with go get -u github.com/golang/protobuf but it threw the next warning
go: module github.com/golang/protobuf is deprecated: Use the "google.golang.org/protobuf" module instead.
So I decided to follow the advice of the warning and ran go get -u google.golang.org/protobuf but then the next step (go run -mod=mod ariga.io/entimport/cmd/entimport -h) threw the following error:
$GOPATH/pkg/mod/github.com/golang/protobuf@v1.5.3/protoc-gen-go/descriptor/descriptor.pb.go:106:61: undefined: descriptorpb.Default_FileOptions_PhpGenericServices
To recreate this issue, I recommend follow the next steps:
go mod init entimport-example
go get -u google.golang.org/protobuf
go run -mod=mod ariga.io/entimport/cmd/entimport -h
The quick fix is to downgrade the version by simply running go get -u github.com/golang/protobuf but it should be attended