cosmos-sdk/depinject
Matt Kocubinski 8c281ee731
feat(x/bank): app wiring migration (#12032)
* Initial work on bank module app wiring

* Fix import in bank module

* integrating bank module into simapp DI

* Integrate usages of ModuleAccountAddrs into DI container, remove from SimApp

* Remove dependency on authkeeper from bank module

* Integrate with keyed resolvers feature of depinject

* Refactoring to remove direct dependency from bank -> auth

* Clean up app.yaml usage in test

* Clean up comments, keys, and testing fns.

* Remove commented example in bank module config

* Regenerate code from proto files

* Fix usage of BlockedModuleAccountsOverride
2022-06-01 16:21:42 -05:00
..
internal refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00
testdata refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00
config.go refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00
container_test.go feat(depinject): key resolvers for interface types (#12103) 2022-06-01 08:58:25 -05:00
container.go feat(depinject): key resolvers for interface types (#12103) 2022-06-01 08:58:25 -05:00
debug.go refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00
errors.go refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00
go.mod refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00
go.sum refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00
group.go refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00
inject.go feat(x/bank): app wiring migration (#12032) 2022-06-01 16:21:42 -05:00
location.go refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00
Makefile refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00
module_dep.go refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00
module_key.go refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00
one_per_module.go refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00
provider_desc_test.go feat(depinject): key resolvers for interface types (#12103) 2022-06-01 08:58:25 -05:00
provider_desc.go feat(depinject): key resolvers for interface types (#12103) 2022-06-01 08:58:25 -05:00
README.md refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00
resolver.go refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00
simple.go refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00
struct_args.go feat(depinject): key resolvers for interface types (#12103) 2022-06-01 08:58:25 -05:00
supply.go refactor!: rename container to cosmossdk.io/depinject (#12020) 2022-05-27 19:34:48 +02:00

Cosmos SDK Dependency Injection container Module

Overview

TODO

Usage

TODO

Debugging

Issues with resolving dependencies in the container can be done with logs and Graphviz renderings of the container tree. By default, whenever there is an error, logs will be printed to stderr and a rendering of the dependency graph in Graphviz DOT format will be saved to debug_container.dot.

Here is an example Graphviz rendering of a successful build of a dependency graph: Graphviz Example

Rectangles represent functions, ovals represent types, rounded rectangles represent modules and the single hexagon represents the function which called Build. Black-colored shapes mark functions and types that were called/resolved without an error. Gray-colored nodes mark functions and types that could have been called/resolved in the container but were left unused.

Here is an example Graphviz rendering of a dependency graph build which failed: Graphviz Error Example

Graphviz DOT files can be converted into SVG's for viewing in a web browser using the dot command-line tool, ex:

> dot -Tsvg debug_container.dot > debug_container.svg

Many other tools including some IDEs support working with DOT files.