* chore: rename container to cosmossdk.io/container * fix imports * add replace for container * remove replace * add replace * fix replace * fix replace * fix replace * fix replace * fix replace * try to fix replace * rename to depinject * rename to depinject * do not use vanity URL for now * try fix tests * try fix tests * try fix tests * build -> inject * build -> inject * go mod tidy * fix dep vulnerability * fix dep vulnerability * fix Dockerfile for liveness-test * fix codeql error * try to solve dependency review * try to solve dependency review * go mod tidy * try to fix tests * another try |
||
|---|---|---|
| .. | ||
| internal | ||
| testdata | ||
| config.go | ||
| container_test.go | ||
| container.go | ||
| debug.go | ||
| errors.go | ||
| go.mod | ||
| go.sum | ||
| group.go | ||
| inject.go | ||
| location.go | ||
| Makefile | ||
| module_dep.go | ||
| module_key.go | ||
| one_per_module.go | ||
| provider_desc_test.go | ||
| provider_desc.go | ||
| README.md | ||
| resolver.go | ||
| simple.go | ||
| struct_args.go | ||
| supply.go | ||
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:
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 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.