build: upgrade buf and contrib/devtools/dockerfile protoc-gen-go version (#10599)

* build: upgrade buf and contrib/devtools/dockerfile protoc-gen-go version

* fix
This commit is contained in:
Aaron Craelius 2021-11-23 12:47:45 -05:00 committed by GitHub
parent e04f2d6a5d
commit 68ee1c477f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 55 additions and 27 deletions

View File

@ -12,7 +12,7 @@ SIMAPP = ./simapp
MOCKS_DIR = $(CURDIR)/tests/mocks
HTTPS_GIT := https://github.com/cosmos/cosmos-sdk.git
DOCKER := $(shell which docker)
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf:1.0.0-rc8
PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git)
export GO111MODULE = on

9
buf.work.yaml Normal file
View File

@ -0,0 +1,9 @@
# Generated by "buf config migrate-v1beta1". Edit as necessary, and
# remove this comment when you're finished.
#
# This workspace file points to the roots found in your
# previous "buf.yaml" configuration.
version: v1
directories:
- proto
- third_party/proto

View File

@ -2,13 +2,14 @@ FROM bufbuild/buf:latest as BUILDER
FROM golang:alpine
ENV GOLANG_PROTOBUF_VERSION=1.3.5 \
ENV GOLANG_PROTOBUF_VERSION=1.27.1 \
GOGO_PROTOBUF_VERSION=1.3.2 \
GRPC_GATEWAY_VERSION=1.14.7
GRPC_GATEWAY_VERSION=1.14.7
RUN GO111MODULE=on go get \
github.com/golang/protobuf/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} \
github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest \
google.golang.org/protobuf/cmd/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} \
github.com/gogo/protobuf/protoc-gen-gogo@v${GOGO_PROTOBUF_VERSION} \
github.com/gogo/protobuf/protoc-gen-gogofast@v${GOGO_PROTOBUF_VERSION} \
github.com/gogo/protobuf/protoc-gen-gogofaster@v${GOGO_PROTOBUF_VERSION} \

2
go.mod
View File

@ -10,7 +10,7 @@ require (
github.com/coinbase/rosetta-sdk-go v0.7.1
github.com/confio/ics23/go v0.6.6
github.com/cosmos/btcutil v1.0.4
github.com/cosmos/cosmos-proto v0.0.0-20210914142853-23ed61ac79ce
github.com/cosmos/cosmos-proto v0.0.0-20211123144845-528f5002c9f8
github.com/cosmos/cosmos-sdk/db v0.0.0
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/iavl v0.17.2

4
go.sum
View File

@ -259,8 +259,8 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44=
github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU=
github.com/cosmos/cosmos-proto v0.0.0-20210914142853-23ed61ac79ce h1:nin7WtIMETZ8LezEYa5e9/iqyEgQka1x0cQYqgUeTGM=
github.com/cosmos/cosmos-proto v0.0.0-20210914142853-23ed61ac79ce/go.mod h1:g2Q3cd94kOBVRAv7ahdtO27yUc4cpNuHGnI40qanl1k=
github.com/cosmos/cosmos-proto v0.0.0-20211123144845-528f5002c9f8 h1:JOVLjm4qgBMnjZIciFqfFMzeIIuJTOXdlpzJdvXQbVA=
github.com/cosmos/cosmos-proto v0.0.0-20211123144845-528f5002c9f8/go.mod h1:msdDWOvfStHLG+Z2y2SJ0dcqimZ2vc8M1MPnZ4jOF7U=
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=
github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw=

20
proto/buf.yaml Normal file
View File

@ -0,0 +1,20 @@
# Generated by "buf config migrate-v1beta1". Edit as necessary, and
# remove this comment when you're finished.
#
# This module represents the "proto" root found in
# the previous configuration.
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
- COMMENTS
- FILE_LOWER_SNAKE_CASE
except:
- UNARY_RPC
- COMMENT_FIELD
- SERVICE_SUFFIX
- PACKAGE_VERSION_SUFFIX
- RPC_REQUEST_STANDARD_NAME

View File

@ -1,7 +1,6 @@
syntax = "proto3";
package cosmos.base.tendermint.v1beta1;
import "gogoproto/gogo.proto";
import "google/protobuf/any.proto";
import "google/api/annotations.proto";
import "tendermint/p2p/types.proto";

View File

@ -1,6 +1,5 @@
syntax = "proto3";
package cosmos.nft.v1beta1;
import "gogoproto/gogo.proto";
option go_package = "github.com/cosmos/cosmos-sdk/x/nft";

View File

@ -1,7 +1,6 @@
syntax = "proto3";
package cosmos.upgrade.v1beta1;
import "google/protobuf/any.proto";
import "google/api/annotations.proto";
import "cosmos/upgrade/v1beta1/upgrade.proto";

View File

@ -1,11 +1,21 @@
version: v1beta1
# Generated by "buf config migrate-v1beta1". Edit as necessary, and
# remove this comment when you're finished.
#
# This module represents the "third_party/proto" root found in
# the previous configuration.
version: v1
build:
roots:
- proto
- third_party/proto
excludes:
- third_party/proto/google/protobuf
- google/protobuf
breaking:
use:
- FILE
ignore:
- confio
- cosmos_proto
- gogoproto
- google
- tendermint
lint:
use:
- DEFAULT
@ -18,17 +28,8 @@ lint:
- PACKAGE_VERSION_SUFFIX
- RPC_REQUEST_STANDARD_NAME
ignore:
- tendermint
- gogoproto
- cosmos_proto
- google
- confio
breaking:
use:
- FILE
ignore:
- tendermint
- gogoproto
- cosmos_proto
- gogoproto
- google
- confio
- tendermint