gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source

Home Page:https://gno.land/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tool to display a graph of dependencies

moul opened this issue · comments

We should have a tool that displays a graph of dependencies for a set of packages, using Graphviz or a similar visualization tool.

We have two main options. The first is to be file-system-first, where the tool would work against the file system. We have some helpers in the gnomod packages that can return this dependency tree. The second option is to have the tool implemented against a store first, which would be "gnoweb" friendly and work locally, but we need to consider performance implications.

In addition to this tool, we should create a CI/CD script that keeps the graph of dependencies for the examples/ folder up-to-date and displayed, perhaps in a README.md file or on Godoc. This would allow us to easily identify if some examples are lacking usage demonstrations or are potentially "dead code".

The reason for this request is that (I love this kind of graph visualization, and) we need more real-world examples to differentiate well-known examples from potentially "dead code" ones. Having this tool and monitoring the graph of examples would help us identify the most used and isolated ones, and encourage people to write code for using it, not just for the sake of writing code.

Hi, I'd like to try and take a stab at this (I also really love this kind of visualization :) ). This would be my first contribution to the repo, and I feel comfortable with this one. I should have a PoC of the file system version fairly quickly.