generated files: update google/protobuf v1.3.5, and fix install for go modules

This patch updates the script and Dockerfile to prevent issues when using go
modules.

The first change is to use a plain `git clone` instead of `go get -d` to download
the source. While (like "pre go-modules") `go get -d` won't *build* the binaries
when go modules are used, it *will* use go modules to download the package
(and dependencies); as a result:

- no git repository will be cloned in gopath
- go modules will be downloaded for "master" (not the version that we specify
  to build)

Note: Once we update to Go 1.16, this script could be updated to use `go install <repo>@version`

The second change is an update to the `update-generated-files` script to detect
the correct version of google/protobuf to use from the `go.mod`'s  `replace` rule,
to make sure we generate (and verify) using the correct version.

The Dockerfile was also updated to update the default versions specified in the
PROTOBUF_VERSION and GOGO_VERSION build-args (although not strictly necessary).

Regenerating the files with this version resulted in a minor formatting change.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2021-06-01 23:00:04 +02:00
parent 8df5671844
commit 056afec140
3 changed files with 9 additions and 6 deletions

View File

@@ -151,7 +151,9 @@ func init() {
proto.RegisterType((*Frame)(nil), "stack.Frame")
}
func init() { proto.RegisterFile("stack.proto", fileDescriptor_b44c07feb2ca0a5a) }
func init() {
proto.RegisterFile("stack.proto", fileDescriptor_b44c07feb2ca0a5a)
}
var fileDescriptor_b44c07feb2ca0a5a = []byte{
// 185 bytes of a gzipped FileDescriptorProto