terra-money / classic-core

GO implementation of the Terra Protocol
https://www.terra.money
Other
979 stars 287 forks source link

[BUG] module name of forked 3rd party library #718

Closed missionliao-cybavo closed 2 years ago

missionliao-cybavo commented 2 years ago

Describe the bug I'm glad to see terra-core forked almost all cosmos related library and replace them in your go.mod file. However, "module" name of those forked library aren't patch to new location on github. Ex.

# in github.com/terra-money/cosmos-sdk/go.mod
module github.com/cosmos/cosmos-sdk

In this case, if I want to develop a library based on terra-core, that's fine, I just need to use "replace" directive in my own go.mod, just like what you did in github.com/terra-money/core/go.mod.

But if I want to develop a library integrating both terra and atom at the same time, that might be a problem. In short, I don't want to replace all cosmos/cosmos-sdk to terra-money/cosmos-sdk. I want to import terra-money/cosmos-sdk directly and use cosmos/cosmos-sdk for atom.

To Reproduce simply run this command could reproduce

$go get github.com/terra-money/cosmos-sdk@v0.44.5
go: github.com/terra-money/cosmos-sdk@v0.44.5: parsing go.mod:
    module declares its path as: github.com/cosmos/cosmos-sdk
            but was required as: github.com/terra-money/cosmos-sdk

Context & versions The latest release (v0.5.17) still have this problem.

suggested solution I'm not sure if it's the best practice. But maybe the module name should fit their github URL? Ex.

# in github.com/terra-money/cosmos-sdk/go.mod
module github.com/terra-money/cosmos-sdk

Similar issue for these packages:

yun-yeo commented 2 years ago

We forked CosmosSDK and Tendermint to make changes only for node operators especially validators, so normal CosmosSDk and Tendermint should work without breaking changes.

so can you try with normal CosmosSDK and Tendermint?

yun-yeo commented 2 years ago

Closing inactive issues, please reopen the issue if you still need help