Skip to content
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

Replace the daggy crate with petgraph #448

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

primeos-work
Copy link
Member

The daggy crate doesn't seem maintained anymore as the last commit was over three years ago 0 and there isn't really any activity since then.

Daggy is already based on top of petgraph and described as follows:

The most prominent type is Dag - a wrapper around petgraph’s Graph
data structure, exposing a refined API targeted towards directed
acyclic graph related functionality.

This means that we can switch directly to petgraph without too much effort. We'll loose some of the refined API, especially walking graphs via iterators, but it doesn't really matter too much as the Acyclic type, "a wrapper around graph types that enforces an acyclicity invariant", works well enough (just a bit less "refined").

We also already used petgraph directly for the tree-of command. This direct dependency on petgraph became the trigger for dropping the dependency on daggy since petgraph yanked the release of version 0.6.6 with the new release of version 0.7.0 1 and the resulting CI failure for the petgraph update 2 made me take a closer look at the situation (we don't necessarily have to drop daggy just yet but it seems for the best given it's unclear future and the duplicated petgraph dependency that causes incompatibilities / build failures).

The `daggy` crate doesn't seem maintained anymore as the last commit was
over three years ago [0] and there isn't really any activity since then.

Daggy is already based on top of `petgraph` and described as follows:
> The most prominent type is Dag - a wrapper around petgraph’s Graph
> data structure, exposing a refined API targeted towards directed
> acyclic graph related functionality.

This means that we can switch directly to `petgraph` without too much
effort. We'll loose some of the refined API, especially walking graphs
via iterators, but it doesn't really matter too much as the `Acyclic`
type, "a wrapper around graph types that enforces an acyclicity
invariant", works well enough (just a bit less "refined").

We also already used `petgraph` directly for the `tree-of` command.
This direct dependency on `petgraph` became the trigger for dropping the
dependency on `daggy` since `petgraph` yanked the release of version
`0.6.6` with the new release of version `0.7.0` [1] and the resulting CI
failure for the `petgraph` update [2] made me take a closer look at the
situation (we don't necessarily have to drop `daggy` just yet but it
seems for the best given it's unclear future and the duplicated
`petgraph` dependency that causes incompatibilities / build failures).

[0]: https://github.com/mitchmindtree/daggy
[1]: petgraph/petgraph#712
[2]: science-computing#446

Signed-off-by: Michael Weiss <michael.weiss@eviden.com>
@primeos-work primeos-work force-pushed the replace-daggy-with-petgraph branch from 571a183 to 5b04fcd Compare January 3, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant