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

Introducing appmodule in depinject breaks compatibility #19011

Closed
julienrbrt opened this issue Jan 10, 2024 · 1 comment
Closed

Introducing appmodule in depinject breaks compatibility #19011

julienrbrt opened this issue Jan 10, 2024 · 1 comment
Labels
C:depinject Issues and PR related to depinject

Comments

@julienrbrt
Copy link
Member

julienrbrt commented Jan 10, 2024

In #19010 I was testing the packages' compatibility with previous SDK versions and noticed that due to depinject importing api in its appmodule package, a simple bump in v0.47 won't immediately work.

(release/v0.47.x {2} ✓) simapp go mod tidy
go: downloading cosmossdk.io/depinject v1.0.0-alpha.4.0.20240110165557-1e7611faab88
go: finding module for package github.com/cosmos/cosmos-proto/any
go: finding module for package cosmossdk.io/api/cosmos/capability/module/v1
go: cosmossdk.io/simapp imports
        cosmossdk.io/api/cosmos/capability/module/v1: module cosmossdk.io/api@latest found (v0.7.2), but does not contain package cosmossdk.io/api/cosmos/capability/module/v1
go: cosmossdk.io/simapp imports
        cosmossdk.io/core/appconfig imports
        github.com/cosmos/cosmos-proto/any: module github.com/cosmos/cosmos-proto@latest found (v1.0.0-beta.3), but does not contain package github.com/cosmos/cosmos-proto/any

A user upgrading to the latest depinject version and using v0.47.x would need to add the following in its go.mod:

replace (
	cosmossdk.io/api => cosmossdk.io/api v0.3.1
	github.com/cosmos/cosmos-proto => github.com/cosmos/cosmos-proto v1.0.0-beta.2
        golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
)

Proposed solutions

  • Move depinject/appmodule somewhere else
    or
  • Create a compatibility matrix for depinject (I am personally quite against that)
    or
  • Accept that users need to add the following replace statement and document it

This issue can serve of document if we proceed with it, but I thought this was something important to note.
For that reason, I haven't tagged depinject after #19010.

@julienrbrt julienrbrt added the C:depinject Issues and PR related to depinject label Jan 10, 2024
@julienrbrt julienrbrt changed the title Introducing appmodule in depinject break compatibility Introducing appmodule in depinject breaks compatibility Jan 10, 2024
@julienrbrt
Copy link
Member Author

We have fixed the api module compatibility thanks to cosmos-proto and we added the golang.org/x/exp replace in the sdk as it will always get bumped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:depinject Issues and PR related to depinject
Projects
None yet
Development

No branches or pull requests

1 participant