diff --git a/Makefile b/Makefile index 2f9aa4ce80..87cb85bad8 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/buf.work.yaml b/buf.work.yaml new file mode 100644 index 0000000000..98094695ff --- /dev/null +++ b/buf.work.yaml @@ -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 diff --git a/contrib/devtools/dockerfile b/contrib/devtools/dockerfile index 10be413453..252e6db3ce 100644 --- a/contrib/devtools/dockerfile +++ b/contrib/devtools/dockerfile @@ -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} \ diff --git a/go.mod b/go.mod index 46673904b5..7790bc80f1 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 0721f1747a..ead4b48b06 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/proto/buf.yaml b/proto/buf.yaml new file mode 100644 index 0000000000..aae636f0a1 --- /dev/null +++ b/proto/buf.yaml @@ -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 diff --git a/proto/cosmos/base/tendermint/v1beta1/query.proto b/proto/cosmos/base/tendermint/v1beta1/query.proto index 5bf18e6682..96a46e53cb 100644 --- a/proto/cosmos/base/tendermint/v1beta1/query.proto +++ b/proto/cosmos/base/tendermint/v1beta1/query.proto @@ -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"; diff --git a/proto/cosmos/nft/v1beta1/event.proto b/proto/cosmos/nft/v1beta1/event.proto index 14b57aacab..96964f08a3 100644 --- a/proto/cosmos/nft/v1beta1/event.proto +++ b/proto/cosmos/nft/v1beta1/event.proto @@ -1,6 +1,5 @@ syntax = "proto3"; package cosmos.nft.v1beta1; -import "gogoproto/gogo.proto"; option go_package = "github.com/cosmos/cosmos-sdk/x/nft"; diff --git a/proto/cosmos/upgrade/v1beta1/query.proto b/proto/cosmos/upgrade/v1beta1/query.proto index dd14ba6401..e5a227bc0d 100644 --- a/proto/cosmos/upgrade/v1beta1/query.proto +++ b/proto/cosmos/upgrade/v1beta1/query.proto @@ -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"; diff --git a/buf.yaml b/third_party/proto/buf.yaml similarity index 63% rename from buf.yaml rename to third_party/proto/buf.yaml index 37f716caba..ab5ffc8ab1 100644 --- a/buf.yaml +++ b/third_party/proto/buf.yaml @@ -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