Skip to content

Commit

Permalink
api: re-generate protobuf code
Browse files Browse the repository at this point in the history
Commit `f18fcd9b` updated the following dependencies:

  - github.com/golang/protobuf: v1.3.2  => v1.4.2
  - google.golang.org/genproto
  - google.golang.org/grpc:     v1.26.0 => v1.27.0

However, the protobuf generated files were not re-generated which is
what this commit addresses.

The newly generated files should be backward compatible. However, the
following warning is now emitted when generating them:

  WARNING: Package "github.com/golang/protobuf/protoc-gen-go/generator"
           is deprecated.
           A future release of golang/protobuf will delete this package,
           which has long been excluded from the compatibility promise.

This is because this package was apparently never meant to be public as
explained in this comment[0]. The fix for this is to migrate to
`google.golang.org/protobuf/compiler/protogen` but this can't be done
until a release of `grpc-go` which includes the following patch[1] is
out. Update the Makefile to output a note with regard to this when generating
the files

It appears that with the newly generated files, protobuf now needs to
be marked as an explicit dep. Fix it by by running:

    go mod tidy && go mod vendor && go mod verify

Fix: f18fcd9

[0]: golang/protobuf#1104 (comment)
[1]: grpc/grpc-go#3453

Signed-off-by: Robin Hahling <[email protected]>
  • Loading branch information
rolinh authored and gandro committed Jul 27, 2020
1 parent 977e6fe commit 1d1427b
Show file tree
Hide file tree
Showing 7 changed files with 3,007 additions and 1,750 deletions.
1 change: 1 addition & 0 deletions api/v1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ map_sep := ,M
GO_MAPPINGS := $(patsubst %/,%,$(map_sep)$(subst $(file_sep),$(map_sep),$(RAW_GO_MAPPINGS)))

$(HUBBLE_GO_TARGETS): $(HUBBLE_PROTO_SOURCES) Makefile deps
@echo NOTE: The warning about package github.com/golang/protobuf/protoc-gen-go/generator can be ignored; \
$(QUIET)set -e; \
for proto in $(HUBBLE_PROTO_SOURCES) ; do \
$(PROTOC) $(HUBBLE_PROTOC_PLUGINS) -I $(HUBBLE_PROTO_PATH) $(PROTO_DEPS) \
Expand Down
Loading

0 comments on commit 1d1427b

Please sign in to comment.