Context
The grpc.ServiceDesc has been exported from protoc-gen-go-grpc v1.1.0. The protoc-gen-orion generates the file that contains an unresolved reference to the unexported name of service desc.
Process
Use the Orion example.
Execute protoc -I. --go-grpc_out=. --go_out=. --orion_out=. simple.proto.
Environment
go version 1.17.6
protoc-gen-go-grpc v1.2.0
protoc-gen-orion latest
protoc-gen-go v1.27.1
Expected result
The simple service should be registered in Orion Serve, and simple_proto/simple.proto.orion.pb.go should not contain any error.
Current result
In simple_proto/simple.proto.orion.pb.go, we got a following error.
Unresolved reference '_SimpleService_serviceDesc'
Possible Fix
Follow the protoc-gen-go-grpc naming role in grpc/grpc-go#4035.
And modify the generating code.
|
serviceDescVar := "_" + servName + "_serviceDesc" |
Context
The
grpc.ServiceDeschas been exported from protoc-gen-go-grpc v1.1.0. Theprotoc-gen-oriongenerates the file that contains an unresolved reference to the unexported name of service desc.Process
Use the Orion example.
Execute
protoc -I. --go-grpc_out=. --go_out=. --orion_out=. simple.proto.Environment
Expected result
The
simple serviceshould be registered in Orion Serve, andsimple_proto/simple.proto.orion.pb.goshould not contain any error.Current result
In
simple_proto/simple.proto.orion.pb.go, we got a following error.Possible Fix
Follow the
protoc-gen-go-grpcnaming role in grpc/grpc-go#4035.And modify the generating code.
Orion/protoc-gen-orion/orion.go
Line 262 in ec021a7