feat: make 0.53 compatible with core-less collections v1.2.x (#24088)

Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
This commit is contained in:
Aaron Craelius 2025-04-01 11:57:11 -04:00 committed by GitHub
parent 9c568bb511
commit a53a593da1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 16 additions and 4 deletions

View File

@ -31,6 +31,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [Unreleased]
## [v1.2.0](https://github.com/cosmos/cosmos-sdk/releases/tag/collections%2Fv1.2.0)
### Improvements
* [#24081](https://github.com/cosmos/cosmos-sdk/pull/24081) Remove `cosmossdk.io/core` dependency.

View File

@ -48,3 +48,7 @@ require (
golang.org/x/text v0.14.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
retract v1.0.0
retract v1.1.0

View File

@ -36,6 +36,10 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [Unreleased]
## [v0.11.3](https://github.com/cosmos/cosmos-sdk/releases/tag/core%2Fv0.11.3)
* [#24088](https://github.com/cosmos/cosmos-sdk/pull/24088) Convert store interface type definitions to type aliases for compatibility with `cosmossdk.io/collections` `v1.2.x`.
## [v0.11.2](https://github.com/cosmos/cosmos-sdk/releases/tag/core%2Fv0.11.2)
* [#21298](https://github.com/cosmos/cosmos-sdk/pull/21298) Backport [#19265](https://github.com/cosmos/cosmos-sdk/pull/19265) to core.

View File

@ -60,3 +60,5 @@ require (
// Version tagged too early and incompatible with v0.50 (latest at the time of tagging)
retract v0.12.0
retract v1.0.0

View File

@ -5,7 +5,7 @@ import "context"
// KVStoreService represents a unique, non-forgeable handle to a regular merkle-tree
// backed KVStore. It should be provided as a module-scoped dependency by the runtime
// module being used to build the app.
type KVStoreService interface {
type KVStoreService = interface {
// OpenKVStore retrieves the KVStore from the context.
OpenKVStore(context.Context) KVStore
}
@ -13,7 +13,7 @@ type KVStoreService interface {
// MemoryStoreService represents a unique, non-forgeable handle to a memory-backed
// KVStore. It should be provided as a module-scoped dependency by the runtime
// module being used to build the app.
type MemoryStoreService interface {
type MemoryStoreService = interface {
// OpenMemoryStore retrieves the memory store from the context.
OpenMemoryStore(context.Context) KVStore
}
@ -21,7 +21,7 @@ type MemoryStoreService interface {
// TransientStoreService represents a unique, non-forgeable handle to a memory-backed
// KVStore which is reset at the start of every block. It should be provided as
// a module-scoped dependency by the runtime module being used to build the app.
type TransientStoreService interface {
type TransientStoreService = interface {
// OpenTransientStore retrieves the transient store from the context.
OpenTransientStore(context.Context) KVStore
}

View File

@ -3,7 +3,7 @@ package store
import dbm "github.com/cosmos/cosmos-db"
// KVStore describes the basic interface for interacting with key-value stores.
type KVStore interface {
type KVStore = interface {
// Get returns nil iff key doesn't exist. Errors on nil key.
Get(key []byte) ([]byte, error)