Closed noslav closed 1 month ago
Even tried upgrading golang to 1.20
One issue gets resolved
# golang.org/x/crypto/sha3
../../../../.asdf/installs/golang/1.19/packages/pkg/mod/golang.org/x/crypto@v0.24.0/sha3/xor.go:25:10: undefined: subtle.XORBytes
but other remains -
# github.com/cosmos/gogoproto/proto
../../../../.asdf/installs/golang/1.20/packages/pkg/mod/github.com/cosmos/gogoproto@v1.4.10/proto/merge.go:260:25: type func(x *descriptorpb.FileDescriptorProto, y *descriptorpb.FileDescriptorProto) bool of func(x, y *descriptorpb.FileDescriptorProto) bool {…} does not match inferred type func(a *descriptorpb.FileDescriptorProto, b *descriptorpb.FileDescriptorProto) int for func(a E, b E) int
? github.com/covalenthq/covenet/docs [no test files]
? github.com/covalenthq/covenet/testutil [no test files]
FAIL github.com/covalenthq/covenet/app [build failed]
FAIL github.com/covalenthq/covenet/x/covenet [build failed]
FAIL github.com/covalenthq/covenet/x/covenet/client/cli [build failed]
FAIL github.com/covalenthq/covenet/x/covenet/keeper [build failed]
FAIL github.com/covalenthq/covenet/x/covenet/types [build failed]
FAIL
I believe the problem is here
/Users/pranay/.asdf/installs/golang/1.21.0/packages/pkg/mod/github.com/cosmos/gogoproto@v1.4.7/proto/merge.go
slices.SortFunc(fds.File, func(x, y *descriptorpb.FileDescriptorProto) bool {
return *x.Name < *y.Name
})
I see this slices.SortFunc
package/fn is only usable since golang 1.21, so I tried upgrading to golang 1.21 as well but still failed here -
go test ./... ─╯
# github.com/cosmos/gogoproto/proto
../../../../.asdf/installs/golang/1.21.0/packages/pkg/mod/github.com/cosmos/gogoproto@v1.4.7/proto/merge.go:123:28: type func(x *descriptorpb.FileDescriptorProto, y *descriptorpb.FileDescriptorProto) bool of func(x, y *descriptorpb.FileDescriptorProto) bool {…} does not match inferred type func(a *descriptorpb.FileDescriptorProto, b *descriptorpb.FileDescriptorProto) int for func(a E, b E) int
? github.com/covalenthq/covenet/docs [no test files]
? github.com/covalenthq/covenet/testutil [no test files]
FAIL github.com/covalenthq/covenet/app [build failed]
FAIL github.com/covalenthq/covenet/x/covenet [build failed]
FAIL github.com/covalenthq/covenet/x/covenet/client/cli [build failed]
FAIL github.com/covalenthq/covenet/x/covenet/keeper [build failed]
FAIL github.com/covalenthq/covenet/x/covenet/types [build failed]
FAIL
v0.47 cannot use the latest gogoproto due to a breaking change in the Go x/exp library
v0.47 cannot use the latest gogoproto due to a breaking change in the Go x/exp library
it is using -> github.com/cosmos/gogoproto v1.4.10 this is not the latest (there's v1.4.11/12 and v1.5.0)
v0.47 cannot use the latest gogoproto due to a breaking change in the Go x/exp library
I see that issue here - how to resolve it?
please note the version of gogoproto is only 1.4.10 (with x.xx.11 and x.xx.12 available) while latest is 1.5.0
../../../../.asdf/installs/golang/1.21.0/packages/pkg/mod/github.com/cosmos/gogoproto@v1.4.10/proto/merge.go:260:25: type func(x *descriptorpb.FileDescriptorProto, y *descriptorpb.FileDescriptorProto) bool of func(x, y *descriptorpb.FileDescriptorProto) bool {…} does not match inferred type func(a *descriptorpb.FileDescriptorProto, b *descriptorpb.FileDescriptorProto) int for func(a E, b E) int
? github.com/covalenthq/covenet/docs [no test files]
? github.com/covalenthq/covenet/testutil [no test files]
FAIL github.com/covalenthq/covenet/app [build failed]
FAIL github.com/covalenthq/covenet/cmd/covenetd/cmd [build failed]
FAIL github.com/covalenthq/covenet/x/covenet [build failed]
FAIL github.com/covalenthq/covenet/x/covenet/client/cli [build failed]
FAIL github.com/covalenthq/covenet/x/covenet/keeper [build failed]
FAIL github.com/covalenthq/covenet/x/covenet/types [build failed]
FAIL
Do you have this line in your app go.mod:
// stick with compatible version or x/exp in v0.47.x line
golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
that resolved it! thanks! However I'm now on golang 1.19 with SDK v0.46.12
go 1.19
require (
github.com/cosmos/cosmos-sdk v0.46.12
github.com/golang/protobuf v1.5.4
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/spf13/cast v1.5.0
github.com/spf13/cobra v1.6.1
github.com/stretchr/testify v1.8.4
google.golang.org/grpc v1.64.1
gopkg.in/yaml.v2 v2.4.0
)
require (
cosmossdk.io/errors v1.0.0-beta.7
github.com/cosmos/gogoproto v1.4.10
github.com/cosmos/ibc-go/v5 v5.0.0
github.com/ethereum/go-ethereum v1.10.26
github.com/gogo/protobuf v1.3.3
github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0
github.com/ignite/cli v0.25.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.13.0
github.com/tendermint/spn v0.2.1-0.20220921200247-8bafad876bdd
github.com/tendermint/tendermint v0.34.27
github.com/tendermint/tm-db v0.6.7
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1
)
The next version upgrade is going to be interesting.
Do you have this line in your app go.mod:
// stick with compatible version or x/exp in v0.47.x line golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
Can you please provide me the source for this file - if you have it? @julienrbrt
Do you have this line in your app go.mod:
// stick with compatible version or x/exp in v0.47.x line golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
Can you please provide me the source for this file - if you have it? @julienrbrt
You should just add a replace golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
at the end of the scaffolded go.mod
in your chain
Do you have this line in your app go.mod:
// stick with compatible version or x/exp in v0.47.x line golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
Can you please provide me the source for this file - if you have it? @julienrbrt
You should just add a
replace golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
at the end of the scaffoldedgo.mod
in your chain
I understood that @julienrbrt, I'm just wondering where you've been getting the actual replacements. Is this something you've used internally? or is an external team building on the cosmos-sdk also doing the same? (and if so can we see the source file)
Chiming back here, we've deleted the x/exp dependency in gogoproto 1.7.0.
To answer your question, from here: https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/go.mod#L202-L203 However, as mentioned above, we've fixed the root issue in gogoproto by removing the problematic dependency
Is there an existing issue for this?
What happened?
Building cosmos-sdk app is failing.
My
go.mod
Cosmos SDK Version
0.47.12
How to reproduce?
ignite27 version ─╯ · · 🛸 Ignite CLI v28.5.0 is available! · · To upgrade your Ignite CLI version, see the upgrade doc: https://docs.ignite.com/guide/install#upgrading-your-ignite-cli-installation · ··
Ignite CLI version: v0.27.2 Ignite CLI build date: 2023-10-18T11:34:58Z Ignite CLI source hash: f3ab0d709ec41e31a1c57f2fe86c8902d8a50497 Ignite CLI config version: v1 Cosmos SDK version: v0.47.3 Your OS: darwin Your arch: arm64 Your Node.js version: v21.7.3 Your go version: go version go1.19 darwin/arm64 Your uname -a: Darwin Pranays-MacBook-Pro-3.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000 arm64 Your cwd: /Users/pranay/Documents/covalent/covenet/covenet Is on Gitpod: false