Skip to content

Commit e135030

Browse files
mergify[bot]julienrbrttac0turtle
authored
fix(runtime): remove appv1alpha1.Config from runtime (backport #21042) (#21080)
Co-authored-by: Julien Robert <[email protected]> Co-authored-by: marbar3778 <[email protected]>
1 parent 0702719 commit e135030

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
4343
* [#20939](https://github.com/cosmos/cosmos-sdk/pull/20939) Fix collection reverse iterator to include `pagination.key` in the result.
4444
* (client/grpc) [#20969](https://github.com/cosmos/cosmos-sdk/pull/20969) Fix `node.NewQueryServer` method not setting `cfg`.
4545
* (testutil/integration) [#21006](https://github.com/cosmos/cosmos-sdk/pull/21006) Fix `NewIntegrationApp` method not writing default genesis to state
46+
* (runtime) [#21080](https://github.com/cosmos/cosmos-sdk/pull/21080) Fix `app.yaml` / `app.json` incompatibility with `depinject v1.0.0`
4647

4748
## [v0.50.8](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.8) - 2024-07-15
4849

runtime/module.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func ProvideApp(interfaceRegistry codectypes.InterfaceRegistry) (
127127
type AppInputs struct {
128128
depinject.In
129129

130-
AppConfig *appv1alpha1.Config
130+
AppConfig *appv1alpha1.Config `optional:"true"`
131131
Config *runtimev1alpha1.Module
132132
AppBuilder *AppBuilder
133133
Modules map[string]appmodule.AppModule

runtime/services.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ import (
1515
)
1616

1717
func (a *App) registerRuntimeServices(cfg module.Configurator) error {
18-
appv1alpha1.RegisterQueryServer(cfg.QueryServer(), services.NewAppQueryService(a.appConfig))
18+
// no app config service if user is using app.yaml / app.json
19+
// it is as in v0.52, this whole query service does not exist at all.
20+
if a.appConfig != nil {
21+
appv1alpha1.RegisterQueryServer(cfg.QueryServer(), services.NewAppQueryService(a.appConfig))
22+
}
1923
autocliv1.RegisterQueryServer(cfg.QueryServer(), services.NewAutoCLIQueryService(a.ModuleManager.Modules))
2024

2125
reflectionSvc, err := services.NewReflectionService()

0 commit comments

Comments
 (0)