-
Notifications
You must be signed in to change notification settings - Fork 70
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
multi-edges generate error on non-strict digraph #52
Comments
I was facing a similar issue, I believe this is a bug in upstream graphviz that has been fixed right after 2.40.1 (in I'm not too familiar with writing cgo wrappers, how hard would it be to update this library to use a more recent graphviz release? Also see #42. |
@goccy This is a wonderful package, thank you! I've also encountered this issue and would like to take a jab at updating the GraphViz version. In #42 you'd mentioned providing a Many thanks in advance! |
Hi @goccy! The library is great, but multi-edges fix would be greatly appreciated :-) Any news on updating Thanks! |
I'd also love to have multi-edges work, but it seems updating the cgraph library here might be a major project (probably first sync with 2.50.1, and then go to 3.0.0?) But, for the fun of it I tried to simply apply the referenced change directly, and that works just fine. git clone https://github.com/goccy/go-graphviz
cd go-graphviz
wget -qO - https://gitlab.com/graphviz/graphviz/-/commit/dbe61e9fe.diff | patch internal/ccall/cgraph/edge.c And in your own project modify @goccy would you accept a PR applying this change? |
This applies the diff of https://gitlab.com/graphviz/graphviz/-/commit/dbe61e9fe to make it possible to create multiple edges between the same nodes as long as the edge names are distinct. Fixes goccy#52
graphviz/cgraph allows to have multiple edges between the same node pair in a non-strict graph, as long as the edges have distinct names. Unfortunately the version of graphviz go-graphviz embeds has a bug in exactly the logic for looking up the edges, so this commit also switches out the version to a fork that has a suitable fix for the problem. See https://gitlab.com/graphviz/graphviz/-/issues/1191 for the original upstream problem, and goccy/go-graphviz#52 for the issue in go-graphviz. Fixes #6
Version
github.com/goccy/go-graphviz v0.0.9
Example Code
Real Output
Expect
As the
graphviz
doc, a non-strict graph should allow multi-edges without merging them.so it should output something like:
The text was updated successfully, but these errors were encountered: