Skip to content

Unable to register service to Orion Server #171

@cs-lexliu

Description

@cs-lexliu

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions