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

Potential dependency inconsistency #295

Open
Ben131-Go opened this issue Jan 29, 2023 · 0 comments
Open

Potential dependency inconsistency #295

Ben131-Go opened this issue Jan 29, 2023 · 0 comments

Comments

@Ben131-Go
Copy link

Dependency line:

github.com/fetchai/fetchd --> github.com/CosmWasm/wasmd --> github.com/99designs/keyring

github.com/CosmWasm/wasmd v0.27.0 --> github.com/cosmos/keyring ef00f8a

https://github.com/CosmWasm/wasmd/blob/v0.27.0/go.mod#L127

Background

Repo github.com/CosmWasm/wasmd at version v0.27.0 uses replace directive to change dependency path from github.com/99designs/keyring to github.com/cosmos/keyring.

According to Go Modules wikis, replace directives in modules other than the main module are ignored when building the main module.
It means such replace usage in dependency's go.mod cannot be inherited when building main module. And it turns out that fetchai/fetchd indirectly relies on 99designs/[email protected], which is different from the new dependency path CosmWasm/wasmd needed.

https://github.com/fetchai/fetchd/blob/master/go.mod(Line 21)

github.com/99designs/keyring v1.1.6 // indirect

https://github.com/CosmWasm/wasmd/blob/v0.27.0/go.mod(line 37&127)

github.com/99designs/keyring v1.1.6 // indirect
github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76

So this is just a reminder in the hope that you can notice such an inconsistency.

Solution

1. Bump the version of dependency github.com/CosmWasm/wasmd

You can try upgrading dependency github.com/CosmWasm/wasmd to a newer version, which may have eliminated the use of this directive.

2. Add the same replace rule to your go.mod

github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant