Skip to content

Commit

Permalink
Update protobuf-related deps
Browse files Browse the repository at this point in the history
This change updates the protobuf deps and makes various fixes. Most
fixes are related to new `XXX_` fields. In particular, the new fields
interfere with JSON marshaling and printing with `%v`.

Note that the new fields could be omitted but that is undesirable:
`XXX_NoUnkeyedLiteral` is a good idea and there would be a performance
cost associated with removing `XXX_sizecache`.

Some more info on important protobuf changes here:
https://groups.google.com/forum/#!topic/golang-nuts/F5xFHTfwRnY

Change lists:
gogo/protobuf@1adfc12...936d59a
googleapis/go-genproto@f676e0f...a1fde74

Note that gogo/protobuf was forked under cockroachdb, and I made a fix
in our fork. This commit should be reviewed:
cockroachdb/gogoproto@d26e6ac

Informs #30774.

Release note: None
  • Loading branch information
RaduBerinde committed Jan 3, 2019
1 parent 4f701b9 commit db4a8a1
Show file tree
Hide file tree
Showing 90 changed files with 22,585 additions and 5,300 deletions.
12 changes: 7 additions & 5 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ ignored = [
name = "golang.org/x/crypto"
branch = "master"

[[constraint]]
name = "github.com/gogo/protobuf"
source = "https://github.com/cockroachdb/gogoproto"
branch = "v1.2.0-with-clone-fix"

# github.com/docker/docker depends on a few functions not included in the
# latest release: reference.{FamiliarName,ParseNormalizedNamed,TagNameOnly}.
#
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1075,10 +1075,9 @@ bin/.go_protobuf_sources: $(PROTOC) $(GO_PROTOS) $(GOGOPROTO_PROTO) bin/.bootstr
build/werror.sh $(PROTOC) -Ipkg:./vendor/github.com:$(GOGO_PROTOBUF_PATH):$(PROTOBUF_PATH):$(COREOS_PATH):$(GRPC_GATEWAY_GOOGLEAPIS_PATH) --gogoroach_out=$(PROTO_MAPPINGS),plugins=grpc,import_prefix=github.com/cockroachdb/cockroach/pkg/:./pkg $$dir/*.proto; \
done
$(SED_INPLACE) -E \
-e '/import _/d' \
-e '/import _ /d' \
-e 's!import (fmt|math) "github.com/cockroachdb/cockroach/pkg/(fmt|math)"! !g' \
-e 's!github\.com/cockroachdb/cockroach/pkg/(etcd)!go.etcd.io/\1!g' \
-e 's!cockroachdb/cockroach/pkg/(prometheus/client_model)!\1/go!g' \
-e 's!github.com/cockroachdb/cockroach/pkg/(bytes|encoding/binary|errors|fmt|io|math|github\.com|(google\.)?golang\.org)!\1!g' \
-e 's!golang.org/x/net/context!context!g' \
$(GO_SOURCES)
Expand Down
140 changes: 110 additions & 30 deletions pkg/acceptance/cluster/testconfig.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 36 additions & 16 deletions pkg/build/info.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit db4a8a1

Please sign in to comment.