googleapis/go-genproto

Commit from earlier today doesn't appear to be BW compat. Is that by design?

mornindew opened this issue · 2 comments

I am attempting to update my go packages with go get -u but I am getting the error:

cloud.google.com/go/storage
# cloud.google.com/go/storage
../../../../../../cloud.google.com/go/storage/storage.go:1447:53: o.GetCustomerEncryption().GetKeySha256 undefined (type *"google.golang.org/genproto/googleapis/storage/v2".Object_CustomerEncryption has no field or method GetKeySha256)
../../../../../../cloud.google.com/go/storage/writer.go:439:10: q.GetCommittedSize undefined (type *"google.golang.org/genproto/googleapis/storage/v2".QueryWriteStatusResponse has no field or method GetCommittedSize)

I looked into it and it appears that code was introduced today that removed both the GetKeySha256 and GetCommittedSize methods from the storage.pb.go file. Is that by design or is that an oversight?

https://github.com/googleapis/go-genproto/blob/master/googleapis/storage/v2/storage.pb.go

Thanks,
Craig

Hey, this was an intentional breaking change to a currently internal api. This should not be an issue once googleapis/google-cloud-go#4987 is merged.

Also, in general I would avoid using go get -u as it will try to update all dependencies in a project, which may result in incompatibilities like this. Instead I would update individual direct dependencies only. The storage module make use of go modules to track the versions of individual dependencies that should be used: https://github.com/googleapis/google-cloud-go/blob/faa764c9470cb03d04504448d97b0beba95541e2/storage/go.mod#L13.

For now I would downgrade genproto to the version declared in the most recent release of the storage client. Hope that helps!

Thanks a lot. That was exactly what I needed.