This PR fixes two problems with the current implementation of loom.io/dot-str which affect viewing graphs with loom.io/view. These are long-standing issues that I have had to circumvent in my own code.
This PR undoes these two issues:
Loom now uses the Loom Edge protocol rather than destructuring a Clojure vector.
Loom now uses the hash of a node as its identity, rather than the node label when building the dot string.
The current behaviour make Loom quite pointless for visualising graphs since Loom doesn't even respect its own graph protocols, preferring to assume that e.g. graph edges are always Clojure vectors. It also results in wrong graphs being drawn since Loom complects node labels and node identity, when clearly it must be possible for two nodes to have the same label in a graph.
This PR fixes two problems with the current implementation of
loom.io/dot-str
which affect viewing graphs withloom.io/view
. These are long-standing issues that I have had to circumvent in my own code.This PR undoes these two issues:
The current behaviour make Loom quite pointless for visualising graphs since Loom doesn't even respect its own graph protocols, preferring to assume that e.g. graph edges are always Clojure vectors. It also results in wrong graphs being drawn since Loom complects node labels and node identity, when clearly it must be possible for two nodes to have the same label in a graph.