Skip to content

Generator redeclares same function name when given a proto with multiple services #322

Open
@wyemun

Description

@wyemun

When give .proto file of such

...
service FirstService {
	rpc List (ObjectA) returns (ObjectA) {}
}

service SecondService {
	rpc List (ObjectB) returns (ObjectB) {}
}

The protoc generator will generate the following stub using mode=grpcwebtext

...
const methodInfo_List = new grpc.web.AbstractClientBase.MethodInfo(
  proto.servicename.ObjectB,
  ...
);

// and another one with the same name
const methodInfo_List = new grpc.web.AbstractClientBase.MethodInfo(
  proto.servicename.ObjectA,
  ...
);

which results in a SyntaxError

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions