Skip to content

Make proto-tools script creates unbuildable proto files #7332

Closed
@AdityaSripal

Description

Summary of Bug

I reinstalled my proto-tools with the new Makefile script and while everything downloaded just fine, and running the proto commands works fine. The final result is unbuildable.

To see an example of the pb.go files this build generated, see this commit: c2b7b56

Trying to build fails on this commit as you can see in the github checks on that commit.

I had to checkout to a version of master before #7294 and reinstall my proto tooling there to get my branch working again.

Version

Commit: 56e3bc1

Operating System: Darwin 19.4.0

Steps to Reproduce

# on master
rm proto-tools-stamp
make proto-tools
make proto-gen
make build
# Result
➜  cosmos-sdk git:(master) ✗ make build
go install -mod=readonly ./...
# github.com/keybase/go-keychain
cgo-gcc-prolog:203:11: warning: 'SecTrustedApplicationCreateFromPath' is deprecated: first deprecated in macOS 10.15 - No longer supported [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecTrustedApplication.h:59:10: note: 'SecTrustedApplicationCreateFromPath' has been explicitly marked deprecated here
# github.com/cosmos/cosmos-sdk/types
types/coin.pb.go:300:8: invalid argument m.Amount (type Int) for len
types/coin.pb.go:301:11: invalid argument m.Amount (type Int) for len
types/coin.pb.go:302:7: second argument to copy should be slice or string; have struct { i *big.Int }
types/coin.pb.go:303:43: invalid argument m.Amount (type Int) for len
types/coin.pb.go:337:8: invalid argument m.Amount (type Dec) for len
types/coin.pb.go:338:11: invalid argument m.Amount (type Dec) for len
types/coin.pb.go:339:7: second argument to copy should be slice or string; have struct { i *big.Int }
types/coin.pb.go:340:43: invalid argument m.Amount (type Dec) for len
types/coin.pb.go:374:8: invalid argument m.Int (type Int) for len
types/coin.pb.go:375:11: invalid argument m.Int (type Int) for len
types/coin.pb.go:375:11: too many errors
make: *** [build] Error 2

I also noticed that in either case, make proto-format was not working for me: #7320 (comment).
proto-tools downloads clang-format version 10.0.1 for me. I don't know if that is the correct version or not.

It's possible something I did in my setup was wrong, but I removed all the executables proto-tools should download and reran the script and still got the same error, so not sure what's happening.

cc: @alessio @alexanderbez


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Metadata

Assignees

Labels

T:Bugtoolingdev tooling within the sdk

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions