-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
refactor(container)!: remove dependency on C graphviz #11934
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
0b04147
refactor(container)!: remove dependency on C graphviz
aaronc 5f8686f
WIP
aaronc 97633dd
working graphviz
aaronc 543eb19
docs
aaronc 29ca974
WIP
aaronc f030108
update docs and graphviz
aaronc f3e2119
update docs
aaronc f91bf8d
update docs
aaronc 01e1d44
add log golden files
aaronc f5e31a6
update makefile
aaronc af60b11
docs
aaronc 2e97d16
docs
aaronc 3c5c11b
docs
aaronc ccda358
Merge branch 'main' into aaronc/11925-graphviz
aaronc 0f11eb9
Merge branch 'main' into aaronc/11925-graphviz
aaronc 30277c0
Merge branch 'main' into aaronc/11925-graphviz
tac0turtle 02c17c6
Merge branch 'main' into aaronc/11925-graphviz
tac0turtle 64c2afb
Merge branch 'main' into aaronc/11925-graphviz
julienrbrt f82d8bc
Merge branch 'main' into aaronc/11925-graphviz
julienrbrt fe454e3
Merge branch 'main' into aaronc/11925-graphviz
julienrbrt e095f16
Merge branch 'main' into aaronc/11925-graphviz
alexanderbez db60d5e
fix/remove non-deterministic tests
aaronc 17e1d2e
Merge branch 'main' into aaronc/11925-graphviz
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
update-testdata-examples: | ||
go test . -test.update-golden | ||
dot -Tsvg testdata/example.dot > testdata/example.svg | ||
dot -Tsvg testdata/example_error.dot > testdata/example_error.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# 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](https://graphviz.org) 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](./testdata/example.svg) | ||
|
||
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](./testdata/example_error.svg) | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should ideally fill these out, albeit it can be concise for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added an issue for this: #11944