cosmos / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Apache License 2.0
6.24k stars 3.61k forks source link

[Bug]: Problems with package references #20723

Closed KyloYang888 closed 4 months ago

KyloYang888 commented 4 months ago

Is there an existing issue for this?

What happened?

Hi team. Can you help me with this ? Thanks

When I import cosmossdk.io in my Golang project, I get an error saying "certificate is expired." So, I directly referenced the GitHub repository in my project: github.com/cosmos/cosmos-sdk.

import (
    "github.com/cosmos/cosmos-sdk/math"
)

func main() {
    math.NewInt(1000)
}

Then, when I run go mod tidy on the above code, I get the following error. How should I resolve it?

go: github.com/monacohq/ncw_iwallet/pkg/osmosis imports
    github.com/cosmos/cosmos-sdk/types imports
    github.com/cometbft/cometbft/rpc/core/types imports
    github.com/cometbft/cometbft/p2p imports
    github.com/cometbft/cometbft/config imports
    github.com/cometbft/cometbft-db imports
    github.com/dgraph-io/badger/v2 imports
    github.com/dgraph-io/badger/v2/y imports
    github.com/cespare/xxhash tested by
    github.com/cespare/xxhash.test imports
    github.com/OneOfOne/xxhash: github.com/cosmos/cosmos-sdk/math@v1.3.0: parsing go.mod:
    module declares its path as: cosmossdk.io/math
            but was required as: github.com/cosmos/cosmos-sdk/math

I have tried adding the following command in go.mod, but the issue is not resolved:

require (
    github.com/cosmos/cosmos-sdk/math latest // indirect
)

replace (
   cosmossdk.io/math => github.com/cosmos/cosmos-sdk/math latest
)

Cosmos SDK Version

0.50.7

How to reproduce?

No response

tac0turtle commented 4 months ago

closing in favour of https://github.com/cosmos/cosmos-sdk/issues/20604. We are still waiting on the ICF, unfortunately we dont control this