-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
examples/helloworld: refresh .pb.go #3519
Conversation
As mentioned in grpc#3516, "update `.pb.go` file due to changes in Go 1.14's `gofmt` and `go-cmp`
c935036
to
874ad31
Compare
Actually, we don't see any change in |
If you rerun (I had assumed that changes to gofmt were the cause, but that might not be the case.) |
Travis does regenerate all the .pb.go files in our nightly runs. It produces the same output as what is submitted. I'm not sure why you're seeing different output; make sure you're using Go 1.14.0 and recompile protoc-gen-go. |
Great that Travis regenerates FWIW, I was running go version $ protoc -I helloworld/ helloworld/helloworld.proto --go_out=plugins=grpc:helloworld
$ diff -u /home/chalin/go/pkg/mod/google.golang.org/grpc\@v1.28.1/examples/helloworld/helloworld /home/chalin/examples/hello_world/helloworld/helloworld.pb.go Yields --- /home/chalin/go/pkg/mod/google.golang.org/grpc@v1.28.1/examples/helloworld/helloworld/helloworld.pb.go 2020-04-11 13:46:16.090853787 +0000
+++ /home/chalin/examples/hello_world/helloworld/helloworld.pb.go 2020-04-11 15:57:21.203040189 +0000
@@ -109,7 +109,9 @@
proto.RegisterType((*HelloReply)(nil), "helloworld.HelloReply")
}
-func init() { proto.RegisterFile("helloworld.proto", fileDescriptor_17b8c58d586b62f2) }
+func init() {
+ proto.RegisterFile("helloworld.proto", fileDescriptor_17b8c58d586b62f2)
+}
var fileDescriptor_17b8c58d586b62f2 = []byte{
// 175 bytes of a gzipped FileDescriptorProto
Diff finished. Mon Apr 13 18:49:05 2020 |
Travis won't commit any changes -- it will just fail if it sees they are not up-to-date. If you are interested, this is an example of it checking: Is it possible you have a different version of |
👍
Thanks for the link -- and cool that we can anchor to a specific line, I hadn't used that feature before!
Not sure what it going on, but given that out-of-date .pb.go files are caught as part of CI, I'll move on to other things. Thanks! |
The format diff is usually caused by a standard package ( The library is released with the language, so usually we see different format when there's a new major go release. But depending on which go version |
Thanks for the explanation @menghanl! |
Not that I wanted to continue harping about this but I was cleaning up my open tabs and noticed that Travis was actually happy with this PR -- it's green across the board as shown below. For my own info, where were you seeing failures (so that I can spot them the next time 'round)? |
Only our cron travis runs check the proto files. This is because we pull many This is how it works: In
In
|
As mentioned in #3516, "update
.pb.go
file due to changes in Go 1.14'sgofmt
andgo-cmp
.cc @dfawley