Skip to content

Having problems with helloworld.proto - basic failure #6

@suityou01

Description

@suityou01

If I use the compiler from the command line like so

protoc --php_out=./src/classes \
  --openswoole-grpc_out=./src/classes \
  --plugin=protoc-gen-grpc=protoc-gen-openswoole-grpc \
  ./proto/helloworld.proto

I get a basic error which doesn't give me much to go on

/usr/local/bin/protoc-gen-openswoole-grpc: 1: Syntax error: "(" unexpected
--openswoole-grpc_out: protoc-gen-openswoole-grpc: Plugin failed with status code 2.

If I omit the --openswoole-grpc_out switch it works

It appears it doesn't like something about the service def

syntax = "proto3";

package helloworld;

// The greeting service definition.
service Greeter {
  // Sends a greeting
  rpc SayHello (HelloRequest) returns (HelloReply) {}
}

service Stream {
  rpc FetchResponse (HelloRequest) returns (stream HelloReply) {}
}

// The request message containing the user's name.
message HelloRequest {
  string name = 1;
}

// The response message containing the greetings
message HelloReply {
  string message = 1;
}

Where am I going wtong?

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