mirror of
https://github.com/tendermint/tendermint.git
synced 2026-04-25 02:00:32 +00:00
fix: proto-breakage (#4506)
* fix: fix proto-breakage - this is amed to fix proto breakage for consumers Signed-off-by: Marko Baricevic <marbar3778@yahoo.com> * fix for importing third_party everywhere * undo change * test breakage change * test ssh * test https * change ssh to https * fix phony
This commit is contained in:
@@ -87,7 +87,7 @@ jobs:
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
command: make proto-check-breaking
|
||||
command: make proto-check-breaking-ci
|
||||
|
||||
test_abci_apps:
|
||||
executor: golang
|
||||
@@ -378,13 +378,10 @@ jobs:
|
||||
# command: |
|
||||
# set -x
|
||||
# export PATH=~/.local/bin:$PATH
|
||||
|
||||
# # install node and dredd
|
||||
# ./scripts/get_nodejs.sh
|
||||
|
||||
# # build the binaries with a proper version of Go
|
||||
# docker run --rm -v "$PWD":/go/src/github.com/tendermint/tendermint -w /go/src/github.com/tendermint/tendermint golang make build-linux build-contract-tests-hooks
|
||||
|
||||
# # This docker image works with go 1.7, we can install here the hook handler that contract-tests is going to use
|
||||
# go get github.com/snikch/goodman/cmd/goodman
|
||||
# make contract-tests
|
||||
|
||||
7
Makefile
7
Makefile
@@ -4,6 +4,7 @@ OUTPUT?=build/tendermint
|
||||
BUILD_TAGS?='tendermint'
|
||||
LD_FLAGS = -X github.com/tendermint/tendermint/version.GitCommit=`git rev-parse --short=8 HEAD` -s -w
|
||||
BUILD_FLAGS = -mod=readonly -ldflags "$(LD_FLAGS)"
|
||||
HTTPS_GIT := https://github.com/tendermint/tendermint.git
|
||||
|
||||
all: check build test install
|
||||
.PHONY: all
|
||||
@@ -57,9 +58,13 @@ proto-lint:
|
||||
.PHONY: proto-lint
|
||||
|
||||
proto-check-breaking:
|
||||
@buf check breaking --against-input '.git#branch=master'
|
||||
@buf check breaking --against-input ".git#branch=master"
|
||||
.PHONY: proto-check-breaking
|
||||
|
||||
proto-check-breaking-ci:
|
||||
@buf check breaking --against-input "$(HTTPS_GIT)#branch=master"
|
||||
.PHONY: proto-check-breaking-ci
|
||||
|
||||
###############################################################################
|
||||
### Build ABCI ###
|
||||
###############################################################################
|
||||
|
||||
@@ -2571,7 +2571,7 @@ func (m *PartSetHeader) GetHash() []byte {
|
||||
// Validator
|
||||
type Validator struct {
|
||||
Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
|
||||
//PubKey pub_key = 2 [(gogoproto.nullable)=false];
|
||||
// PubKey pub_key = 2 [(gogoproto.nullable)=false];
|
||||
Power int64 `protobuf:"varint,3,opt,name=power,proto3" json:"power,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
|
||||
@@ -26,7 +26,7 @@ var _ = math.Inf
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// Define these here for compatibility but use tmlibs/common.KVPair.
|
||||
// Define these here for compatibility but use tmlibs/kv.Pair.
|
||||
type Pair struct {
|
||||
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
|
||||
@@ -82,7 +82,7 @@ func (m *Pair) GetValue() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Define these here for compatibility but use tmlibs/common.KI64Pair.
|
||||
// Define these here for compatibility but use tmlibs/kv.KI64Pair.
|
||||
type KI64Pair struct {
|
||||
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
|
||||
|
||||
@@ -8,4 +8,4 @@ for dir in $proto_dirs; do
|
||||
-I. \
|
||||
--gogo_out=Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp,Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration,plugins=grpc,paths=source_relative:. \
|
||||
$(find "${dir}" -name '*.proto')
|
||||
done
|
||||
done
|
||||
|
||||
23
tools.mk
23
tools.mk
@@ -77,29 +77,14 @@ $(PROTOBUF):
|
||||
@go get github.com/gogo/protobuf/protoc-gen-gogo@v1.3.1
|
||||
.PHONY: protobuf
|
||||
|
||||
buf: protoc-gen-buf-check-breaking protoc-gen-buf-check-lint
|
||||
buf:
|
||||
@echo "Installing buf..."
|
||||
@curl -sSL \
|
||||
"https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/buf-${UNAME_S}-${UNAME_M}" \
|
||||
-o "${BIN}/buf" && \
|
||||
chmod +x "${BIN}/buf"
|
||||
"https://github.com/bufbuild/buf/releases/download/v$(BUF_VERSION)/buf-$(UNAME_S)-$(UNAME_M)" \
|
||||
-o "$(BIN)/buf" && \
|
||||
chmod +x "$(BIN)/buf"
|
||||
.PHONY: buf
|
||||
|
||||
protoc-gen-buf-check-breaking:
|
||||
@echo "Installing protoc-gen-buf-check-breaking..."
|
||||
@curl -sSL \
|
||||
"https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/protoc-gen-buf-check-breaking-${UNAME_S}-${UNAME_M}" \
|
||||
-o "${BIN}/protoc-gen-buf-check-breaking" && \
|
||||
chmod +x "${BIN}/protoc-gen-buf-check-breaking"
|
||||
|
||||
protoc-gen-buf-check-lint:
|
||||
@echo "Installing protoc-gen-buf-check-lint..."
|
||||
@curl -sSL \
|
||||
"https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/protoc-gen-buf-check-lint-${UNAME_S}-${UNAME_M}" \
|
||||
-o "${BIN}/protoc-gen-buf-check-lint" && \
|
||||
chmod +x "${BIN}/protoc-gen-buf-check-lint"
|
||||
.PHONY: protoc-gen-buf-check-lint
|
||||
|
||||
goodman: $(GOODMAN)
|
||||
$(GOODMAN):
|
||||
@echo "Get Goodman"
|
||||
|
||||
Reference in New Issue
Block a user