From 9475b3e930768edb05ae385620580dbf31db14a4 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Tue, 4 Dec 2018 14:31:20 -0800 Subject: [PATCH] Makefile: use a specific protoc-gen-go version 'make gen' no longer works because it uses the git version of protoc-gen-go, which is no longer compatible with the latest released version of github.com/golang/protobuf/proto, which we're using. Freeze the protoc-gen-go version so that it keeps working. --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 29aa58b..61760dc 100644 --- a/Makefile +++ b/Makefile @@ -171,7 +171,9 @@ $(BIN)/golint: GO111MODULE=off go get github.com/golang/lint/golint GO111MODULE=off go build -o $@ github.com/golang/lint/golint $(BIN)/protoc-gen-go: - GO111MODULE=off go get github.com/golang/protobuf/protoc-gen-go + GO111MODULE=off go get -d github.com/golang/protobuf/protoc-gen-go + git -C "$(shell go env GOPATH)/src/github.com/golang/protobuf" checkout v1.2.0 + go install github.com/golang/protobuf/protoc-gen-go GO111MODULE=off go build -o $@ github.com/golang/protobuf/protoc-gen-go $(BIN)/goimports: GO111MODULE=off go get golang.org/x/tools/cmd/goimports -- 2.39.5