Stream: contributing

Topic: dependency graph


view this post on Zulip Bram (Jul 26 2024 at 10:40):

For new contributors, it might come in handy to have a dependency graph.
I wonder if we should something like this in the documentation / repository somewhere?

graph.svg

If so, I could create a Github action that generates such graph and automatically commits it as soon as the graph has changed.

view this post on Zulip Bram (Jul 26 2024 at 10:41):

Apparently, Zulip does not let you easily render vector graphics, here is a png:
graph.png

view this post on Zulip Kiryl Dziamura (Jul 26 2024 at 10:55):

It's super cool! I think it might be a very good addition to CONTRIBUTING.md

view this post on Zulip Kiryl Dziamura (Jul 26 2024 at 10:58):

I'd only prefer the arrows to have the opposite direction, from dependency to package

view this post on Zulip Bram (Jul 26 2024 at 11:08):

Like this?
graph.png

view this post on Zulip Kiryl Dziamura (Jul 26 2024 at 11:10):

yep. so I see the flow from the deepest package to the top-most. but maybe it's only my mindset and the reasoning is uncommon for dependency graphs

view this post on Zulip Bram (Jul 26 2024 at 11:13):

Normally in a dependency graph each node points to the node on which it depends, so though I understand your reasoning, others might expect it the other way around ;)

view this post on Zulip Anton (Jul 26 2024 at 12:13):

I do prefer the arrow direction used in the first image

view this post on Zulip Anton (Jul 26 2024 at 12:23):

If so, I could create a Github action that generates such graph and automatically commits it as soon as the graph has changed.

The graph is a great idea, we do have some type of overarching setting we need for CI security that ends up not allowing github actions write permission. So, I think we could include the png in the repo, check for changes and error with "the dependency graph has changed, please run nix develop -c update-graph" and commit the result. update-graph would be an alias like here.

view this post on Zulip Kiryl Dziamura (Jul 26 2024 at 13:02):

not allowing github actions write permission

it's always possible for GA to create a pr, no?
but yeah, it would mean inconsistency

view this post on Zulip Anton (Jul 26 2024 at 13:44):

The github action would still get broad access to our self-hosted server and the code that runs inside the action is not reviewed in the PR, so I'd like to keep it simple and secure. Changes to the dependency graph should also be quite rare.

view this post on Zulip Brendan Hansknecht (Jul 26 2024 at 15:18):

Idk, seeing the chaos in the dependency graph might inspire people to try and improve it and our incremental compile times.

view this post on Zulip Brendan Hansknecht (Jul 26 2024 at 15:19):

So the graph existing might lead to the graph changing more often.

view this post on Zulip Anton (Jul 26 2024 at 15:21):

So the graph existing might lead to the graph changing more often.

That's fine, I don't expect it will change so often that the the CI failure (when the graph needs to be updated because the committer forgot) becomes bothersome

view this post on Zulip Brendan Hansknecht (Jul 26 2024 at 16:39):

Yeah, definitely not. In fact I home it inspires some people to improve it


Last updated: Jul 06 2025 at 12:14 UTC