Closed ebiggers closed 2 years ago
@ebiggers I rebased this on latest master
and regenerated the go.mod
and go.sum
files. It looks mostly similar, with a few slightly different versions. I think it's easier to just try to update everything. Also it seems like if go 1.16
is specified, go mod tidy
doesn't include direct dependancies. But if go 1.18
is specified, indirect deps are included. For this reason, I think keeping indirect deps out for now is fine.
Also, I update the CI to use go 1.18 instead of the (unspecified) default version.
That generally sounds good, but I'm getting a bunch of deprecation errors when running make lint
now, probably due to the protobuf module upgrade:
filesystem/filesystem.go:48:2: package github.com/golang/protobuf/proto is deprecated: Use the "google.golang.org/protobuf/proto" package instead. (SA1019)
filesystem/filesystem_test.go:30:2: package github.com/golang/protobuf/proto is deprecated: Use the "google.golang.org/protobuf/proto" package instead. (SA1019)
metadata/checks.go:23:2: package github.com/golang/protobuf/proto is deprecated: Use the "google.golang.org/protobuf/proto" package instead. (SA1019)
metadata/config.go:32:2: package github.com/golang/protobuf/jsonpb is deprecated: Use the "google.golang.org/protobuf/encoding/protojson" package instead. (SA1019)
metadata/config_test.go:26:2: package github.com/golang/protobuf/proto is deprecated: Use the "google.golang.org/protobuf/proto" package instead. (SA1019)
metadata/metadata.pb.go:45:9: proto.EnumName is deprecated: Do not use. (SA1019)
metadata/metadata.pb.go:87:9: proto.EnumName is deprecated: Do not use. (SA1019)
[and lots more]
I guess we need to switch to google.golang.org/protobuf/proto
; I was hoping to avoid doing everything at once though!
@ebiggers can you handle the google.golang.org/protobuf/proto
upgrade or should I?
@ebiggers can you handle the
google.golang.org/protobuf/proto
upgrade or should I?
I'll look into it.
@ebiggers can you handle the
google.golang.org/protobuf/proto
upgrade or should I?I'll look into it.
https://github.com/google/go-tpm-tools/tree/master/proto is an example of how we did it in another project. Those put the generated files in their own packages, but it should also be possible to put them in the metadata
package alongside other Go code.