Skip to content

Commit

Permalink
fix: comments and correct protoc options for the version
Browse files Browse the repository at this point in the history
  • Loading branch information
JimLarson committed Nov 16, 2021
1 parent dcbc9cd commit 7e04df7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
5 changes: 4 additions & 1 deletion golang/cosmos/scripts/protocgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ set -eo pipefail

proto_dirs=$(find . -path ./third_party -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
for dir in $proto_dirs; do
# NOTE: when migrating to grpc-gateway v2, we will need to remove the
# allow_colon_final_segments=true
# as per https://grpc-ecosystem.github.io/grpc-gateway/docs/development/grpc-gateway_v2_migration_guide/#withlastmatchwins-and-allow_colon_final_segmentstrue-is-now-default-behaviour
protoc \
-I proto \
-I third_party/proto \
--gocosmos_out=plugins=interfacetype+grpc,\
Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \
--grpc-gateway_out=logtostderr=true:. \
--grpc-gateway_out=logtostderr=true,allow_colon_final_segments=true:. \
$(find "${dir}" -maxdepth 1 -name '*.proto')
done

Expand Down
2 changes: 1 addition & 1 deletion golang/cosmos/third_party/proto/google/protobuf/any.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ package google.protobuf;
import "gogoproto/gogo.proto";

option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option go_package = "github.com/cosmos/cosmos-sdk/codec/types";
option go_package = "github.com/golang/protobuf/ptypes/any";
option java_package = "com.google.protobuf";
option java_outer_classname = "AnyProto";
option java_multiple_files = true;
Expand Down
2 changes: 2 additions & 0 deletions golang/cosmos/tools/tools.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// +build tools
//
// This file exists only to make references to tool modules we need.

package tools

Expand Down
10 changes: 5 additions & 5 deletions golang/cosmos/x/swingset/types/query.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions golang/cosmos/x/vbank/types/query.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7e04df7

Please sign in to comment.