Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignite chain serve downgrades Cosmos SDK to v0.39.3 #3268

Closed
fadeev opened this issue Dec 12, 2022 · 8 comments
Closed

ignite chain serve downgrades Cosmos SDK to v0.39.3 #3268

fadeev opened this issue Dec 12, 2022 · 8 comments
Assignees
Labels
component:cli-serve Related to Ignite serve. type:bug Something isn't working

Comments

@fadeev
Copy link
Contributor

fadeev commented Dec 12, 2022

Before serve

git clone https://github.com/munblockchain/mun

go.mod:

require (
	github.com/CosmWasm/wasmd v0.29.2
	github.com/CosmWasm/wasmvm v1.1.1
	github.com/CosmosContracts/juno/v7 v7.0.0
	github.com/cosmos/cosmos-sdk v0.45.10
)

After serve

ignite chain serve

Cosmos SDK's version is: stargate - v0.45.10

🛠  Building proto...
cannot build app:

        cannot build app:

        error while running command /var/folders/99/8wgfq2091jjgjrq21d_886_r0000gn/T/protoc1229215397 -I /var/folders/99/8wgfq2091jjgjrq21d_886_r0000gn/T/3026769701 -I /Users/fadeev/mun/proto --gocosmos_out=plugins=interfacetype+grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. /Users/fadeev/mun/proto/alloc/v1beta1/genesis.proto /Users/fadeev/mun/proto/alloc/v1beta1/params.proto /Users/fadeev/mun/proto/alloc/v1beta1/query.proto /Users/fadeev/mun/proto/alloc/v1beta1/tx.proto: gogoproto/gogo.proto: File not found.
alloc/v1beta1/params.proto:7:1: Import "gogoproto/gogo.proto" was not found or had errors.
alloc/v1beta1/genesis.proto:4:1: Import "gogoproto/gogo.proto" was not found or had errors.
alloc/v1beta1/genesis.proto:5:1: Import "alloc/v1beta1/params.proto" was not found or had errors.
alloc/v1beta1/genesis.proto:13:3: "Params" is not defined.
: exit status 1
Waiting for a fix before retrying...

go.mod:

require (
	github.com/CosmWasm/wasmd v0.11.1
	github.com/CosmWasm/wasmvm v1.1.1
	github.com/armon/go-metrics v0.4.0
	github.com/cosmos/cosmos-sdk v0.39.3
)

Maybe it's because incompatible peer dependencies?

@fadeev fadeev added type:bug Something isn't working component:cli-serve Related to Ignite serve. labels Dec 12, 2022
@tbruyelle
Copy link
Contributor

the go.mod is being modified by the following command which happens during chain serve :

$ go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos github.com/golang/protobuf/protoc-gen-go github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2

If you run only this command, you will see the cosmos-sdk dependency being downgraded to v0.39.3. After that it's not possible to fix it with a simple go mod tidy, seems like the dependency graph is broken.

Is it a blocking point for this blockchain's developers ? If yes I can investigate further.

tbruyelle added a commit that referenced this issue Dec 12, 2022
This is helpful when you need to know what command is responsible for a
particular change, like in #3268.
tbruyelle added a commit that referenced this issue Dec 12, 2022
This is helpful when you need to know what command is responsible for a
particular change, like in #3268.

Co-authored-by: Alex Johnson <[email protected]>
@fadeev
Copy link
Contributor Author

fadeev commented Dec 13, 2022

Thanks for investigating, @tbruyelle! Let's wait for a reply from the team that encountered the problem 👍

@PhantomTop
Copy link

I pulled latest ignite cli repo and installed. But same error. ( The debug string became a little detailed)

@tbruyelle
Copy link
Contributor

We probably need a fix on the CLI. At first glance I would say the CLI shouldn't run go get to install dependency tools, because this is what creates the dependency mess. I have an idea on how to avoid that. Stay tuned.

@Pitasi
Copy link
Contributor

Pitasi commented Mar 9, 2023

It started happening to me as well :(

ignite version:

Ignite CLI version:             v0.26.1
Ignite CLI build date:          2023-01-24T18:50:18Z
Ignite CLI source hash:         d2a2e287c176ba010557f0b8fbaa198cdeee928d
Ignite CLI config version:      v1
Cosmos SDK version:             v0.46.7
Your OS:                        darwin
Your arch:                      arm64
Your Node.js version:           v16.17.0
Your go version:                go version go1.20.2 darwin/arm64
Your uname -a:                  Darwin antonio-s00 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 arm64
Your cwd:                       /Users/antonio/git/qredosmos
Is on Gitpod:                   false

go.mod before:

require (
	cosmossdk.io/math v1.0.0-beta.4
	github.com/cosmos/cosmos-sdk v0.46.7
	github.com/cosmos/ibc-go/v6 v6.1.0
	github.com/gogo/protobuf v1.3.3
	github.com/golang/protobuf v1.5.3
	github.com/grpc-ecosystem/grpc-gateway v1.16.0
	github.com/ignite/cli v0.26.1
	github.com/spf13/cast v1.5.0
	github.com/spf13/cobra v1.6.1
	github.com/spf13/pflag v1.0.5
	github.com/stretchr/testify v1.8.1
	github.com/tendermint/tendermint v0.34.24
	github.com/tendermint/tm-db v0.6.7
	google.golang.org/genproto v0.0.0-20230223222841-637eb2293923
	google.golang.org/grpc v1.53.0
	gopkg.in/yaml.v2 v2.4.0
)

then ignite runs go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos and the go.mod becomes:

require (
	cosmossdk.io/math v1.0.0-beta.4
	github.com/cosmos/cosmos-sdk v0.44.0
	github.com/gogo/protobuf v1.3.3
	github.com/golang/protobuf v1.5.3
	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/spf13/pflag v1.0.5
	github.com/stretchr/testify v1.8.1
	github.com/tendermint/tendermint v0.34.14
	github.com/tendermint/tm-db v0.6.7
	google.golang.org/genproto v0.0.0-20230223222841-637eb2293923
	google.golang.org/grpc v1.53.0
	gopkg.in/yaml.v2 v2.4.0
)

is there anything I should do? Manually using go build works.

@tbruyelle
Copy link
Contributor

hey @Pitasi, can you try the following steps:

  • build ignite from feat/doctor_cmd branch
  • in your chain's folder, discard the go.mod changes
  • run ignite doctor
  • run ignite c serve again

@Pitasi
Copy link
Contributor

Pitasi commented Mar 10, 2023

Yep, that worked!

@tbruyelle
Copy link
Contributor

Cool, so to summarize what this alternative version is doing:

  • write a tools/tools.go file in your chain's folder if it doesn't exist. The file imports the required tool dependencies (this pattern is described here)
  • replace go get with go mod tidy && go install which is now the standard way of installing tool dependencies.

I'll put more info in the related PR so it can get merged.

Jchicode pushed a commit to Jchicode/cli that referenced this issue Aug 9, 2023
This is helpful when you need to know what command is responsible for a
particular change, like in ignite#3268.

Co-authored-by: Alex Johnson <[email protected]>
@Pantani Pantani closed this as completed Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:cli-serve Related to Ignite serve. type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants