[WIP] Try the latest protobuf code generators#40
[WIP] Try the latest protobuf code generators#40kzys wants to merge 5 commits intocontainerd:mainfrom
Conversation
|
just FYI, I noticed something looking at this run--the |
08abd43 to
eb6c190
Compare
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
- plugins are fully deprecated. - packages may work, but gogo wouldn't. Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
| @@ -5,11 +5,6 @@ version = "unstable" | |||
| # example that selects the ctrd vanity binary. | |||
| # generator = "gogoctrd" | |||
There was a problem hiding this comment.
According to https://grpc.io/docs/languages/go/quickstart/#regenerate-grpc-code, the new command line options for generating gRPC code is like
$ protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
helloworld/helloworld.proto
So we may need to have multiple generators instead.
| # Plugins allows one to specify one or more plugins for use in generation. | ||
| # | ||
| # The common example grpc is provided below. | ||
| plugins = ["grpc"] |
There was a problem hiding this comment.
The new Go code generator doesn't support plugins. We may need to deprecate the field.
| @@ -53,10 +48,6 @@ plugins = ["grpc"] | |||
| # | |||
| # We have a few examples to map packages from the examples. | |||
| [packages] | |||
There was a problem hiding this comment.
The package replacement still works, but gogo would not work with the latest protobuf. We may need another packages as an example.
https://developers.google.com/protocol-buffers/docs/reference/go-generated#package
| {{- $plugin}} | ||
| {{- end -}} | ||
| ,{{- end -}}import_path={{.ImportPath}} | ||
| ,{{- end -}} |
There was a problem hiding this comment.
I'm not really sure the effect of this removal. Apparently protobuild works without the flag.
e6b57d6 to
ad41928
Compare
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
|
The build is green now! Let me extract small PRs from here. |
Signed-off-by: Kazuyoshi Kato katokazu@amazon.com