DocGen dependency diagram generator has unresolved `dot` dependency
(econia) econia % aptos move document --include-dep-diagram
Compiling, may take a little while to download git dependencies...
INCLUDING DEPENDENCY AptosFramework
INCLUDING DEPENDENCY AptosStdlib
INCLUDING DEPENDENCY MoveStdlib
BUILDING Econia
error: The Graphviz tool "dot" is not available. No such file or directory (os error 2)
┌─ <unknown>:1:1
│
1 │ <unknown>
│ ^^^^^^^^^
{
"Error": "Unexpected error: documentation generation failed"
}
@wrwg @alinush @davidiw @gregnazario
@junkil-park who build this feature a while ago.
I think the user is responsible for installing this, but the error message could be nice.
This should be added to the dev_setup.sh script for the prover. @junkil-park can you ensure it's there?
This issue is stale because it has been open 45 days with no activity. Remove the stale label or comment - otherwise this will be closed in 15 days.
Did this get resolved @junkil-park ?
The command to install the graphviz dot has been included in the prover_setup.sh script: https://github.com/aptos-labs/aptos-core/blob/main/developer-docs-site/static/scripts/prover_setup.sh#L352
And, here is a PR to add graphviz to dev_setup.sh in aptos_core: https://github.com/aptos-labs/aptos-core/pull/7237
@junkil-park After brew installing graphviz I'm pleased to report that the command from the issue description now runs.
I see that the generated forward- and backward-dependency SVG diagrams are only at the module level, though: is there anyway to get function dependencies inside of a module (example)?
@alnoki , thank you. Move's docgen can generate and incorporate the function call diagrams. For example, https://github.com/aptos-labs/aptos-core/blob/doc-with-diagrams/aptos-move/framework/aptos-framework/doc/account.md#function-rotate_authentication_key_internal. However, Aptos CLI does not expose the feature to users currently. I will work on this next. Before doing that, I would like to hear your ideas/feedback. I will contact to you via email.
@alnoki , thank you. Move's docgen can generate and incorporate the function call diagrams. For example, https://github.com/aptos-labs/aptos-core/blob/doc-with-diagrams/aptos-move/framework/aptos-framework/doc/account.md#function-rotate_authentication_key_internal. However, Aptos CLI does not expose the feature to users currently. I will work on this next. Before doing that, I would like to hear your ideas/feedback. I will contact to you via email.
Sounds good, thanks! Do these function diagrams also include calls to other modules? e.g. another_module::a_called_function?
@alnoki, yes, it does. In this diagram, different boxes represent different modules: https://raw.githubusercontent.com/aptos-labs/aptos-core/doc-with-diagrams/aptos-move/framework/aptos-framework/doc/img/account_rotate_authentication_key_internal_forward_call_graph.svg
@alnoki, yes, it does. In this diagram, different boxes represent different modules: https://raw.githubusercontent.com/aptos-labs/aptos-core/doc-with-diagrams/aptos-move/framework/aptos-framework/doc/img/account_rotate_authentication_key_internal_forward_call_graph.svg
@junkil-park awesome, thanks!