New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Try the latest protobuf code generators #40
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -35,7 +35,7 @@ var ( | |||
{{- if $index}}+{{end}} | |||
{{- $plugin}} | |||
{{- end -}} | |||
,{{- end -}}import_path={{.ImportPath}} | |||
,{{- end -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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