What would be the simplest way to get the dependen...
# general
h
What would be the simplest way to get the dependency graph between all
python_distribution
targets? With the aim of highlighting and preventing circular dependencies between distributions?
f
if you can wait for 2.20, there is https://github.com/pantsbuild/pants/pull/20566 so you could export the adjacency list and filter your targets. This information is currently presented in the output of the
peek
goal as well, but requires a bit of JSON munging.
so you'd need to 1. get dependencies of all
python_distribution
targets, potentially transitively 2. get a list of
python_distribution
targets in the codebase 3. check if there are any targets from step (2) in the list of deps from step (1)
it sounds like a useful feature to be able to filter the dependencies based on a certain type (e.g. only show deps of type
python_distribution
but this would currently require two steps - you get all the deps and then you can filter them)
h
That 2.20 feature looks like exactly what I would want. Until then, I’ll try and whip something up! Thanks Alexey, hope you’re well 🙏 I was also wondering if there’s an alternative to Graph my Repo, since that is now shut down? Preferably one with a JSON output or similar. If you know of one?
f
Visualising a large graph is inherently challenging, but I have been somewhat successful using https://github.com/tweag/skyscope
❤️ 1