protoc returns Unknown flag: --go-grpc_opts

628 views
Skip to first unread message

Jeff Kayser

unread,
Jun 21, 2023, 7:32:19 PM6/21/23
to Protocol Buffers
[jeffkayser@localhost ch12]$ protoc --go-grpc_out=. --go-grpc_opts=source_relative housework/v1/housework.proto
Unknown flag: --go-grpc_opts
[jeffkayser@localhost ch12]$ pwd
/home/jeffkayser/projects/jkayser/network/ch12
[jeffkayser@localhost ch12]$ 

Fedora 38:

[jeffkayser@localhost ch12]$ uname -a
Linux localhost.localdomain 6.3.8-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 15 02:15:40 UTC 2023 x86_64 GNU/Linux
[jeffkayser@localhost ch12]$
 
Go 1.20.5

[jeffkayser@localhost ch12]$ go version
go version go1.20.5 linux/amd64
[jeffkayser@localhost ch12]$ 

Protocol buffers:

[jeffkayser@localhost ch12]$ which protoc
/usr/bin/protoc
[jeffkayser@localhost ch12]$ which protoc-gen-go
/usr/bin/protoc-gen-go
[jeffkayser@localhost ch12]$ which protoc-gen-go-grpc
/usr/bin/protoc-gen-go-grpc
[jeffkayser@localhost ch12]$ /usr/bin/protoc --version
libprotoc 3.19.6
[jeffkayser@localhost ch12]$ /usr/bin/protoc-gen-go --version
protoc-gen-go v1.28.1
[jeffkayser@localhost ch12]$ /usr/bin/protoc-gen-go-grpc --version
protoc-gen-go-grpc 1.2.0
[jeffkayser@localhost ch12]$

Any help would be appreciated.

Jeff Kayser

Daz Wilkin

unread,
Jun 25, 2023, 10:25:01 PM6/25/23
to Protocol Buffers
It's `--go-grpc_opt` (no `s`)

Jeff Kayser

unread,
Jun 25, 2023, 11:50:18 PM6/25/23
to Daz Wilkin, Protocol Buffers
Hi, Daz.

Doh!  Now I feel really stupid.  Thanks for letting me know.

Jeff Kayser




--
You received this message because you are subscribed to a topic in the Google Groups "Protocol Buffers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/protobuf/nvkLDlr9_lo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to protobuf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/4168088d-b29b-499c-8ced-a8b4bda8c60fn%40googlegroups.com.

Daz Wilkin

unread,
Jun 26, 2023, 12:24:08 AM6/26/23
to Protocol Buffers
You should not.

We've all done it .... mix hyphens and underscores .... it's confusing.
Reply all
Reply to author
Forward
0 new messages