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

Update petgraph and use StableGraph #12

Closed
Jengamon opened this issue Mar 13, 2017 · 7 comments
Closed

Update petgraph and use StableGraph #12

Jengamon opened this issue Mar 13, 2017 · 7 comments

Comments

@Jengamon
Copy link

Hello.
I'm here, getting ready to use daggy in a project of mine, when I check Dag's documentation, and find out that removals may change indices. I looked around (docs.rs), and found that because daggy used petgraph 0.2.2, it missed out on petgraph 0.4.3's StableGraph.

I would like to propose updating, and building Dag off of StableGraph, in order to stablize indices.

@mitchmindtree
Copy link
Owner

@Bobhostern Something along these lines sounds great 👍 I think I'd prefer if we maintained both options somehow: the current slightly more performant option as well as a version based on StableGraph.

I've been thinking about this for a while and I'm still unsure what the best abstraction for this is. Personally I think I'd like to see petgraph's Graph be generic over the node/edge storage so that it did not require an entirely separate, almost identical API implementation just for the StableGraph. However I understand that this is tricky to do cleanly without something like Higher-Kinded Types. As a result, it's probably best for us to do something similar in daggy where we implement a second, StableDag type.

I'm slightly tempted to just switch the Dag to use StableGraph internally, however it is hard to tell how much this would impact downstream crates like dsp-chain and conrod.

@bluss
Copy link
Contributor

bluss commented Mar 14, 2017

I gave that a big attempt before picking the current way. There's a lot more traits that G & SG have in common now, though, than before.

@ghost ghost mentioned this issue Mar 28, 2017
@vilunov
Copy link

vilunov commented Jun 16, 2017

Any progress on updating petgraph dependency? Recent std changes made petgraph broken, which was fixed in 0.4.5.

@azriel91
Copy link
Contributor

#16 doesn't address the changing indices, it just allows daggy to compile.

@mitchmindtree
Copy link
Owner

daggy 0.5.0 was just published which now depends on petgraph 0.4.5, fixing the issue on nightly. I'm going to leave this issue open though as I still think it would still be nice to add a StableDag type.

@davenza
Copy link
Contributor

davenza commented Sep 6, 2018

I just opened a pull request with an early implementation of the StableDag structure in #21.

@mitchmindtree
Copy link
Owner

Closed via #21.

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

No branches or pull requests

6 participants