Open gitsmol opened 1 year ago
Alright, I looked closer at the ELK docs and answered my own question. The problem is some of the algorithms are specifically designed for unconnected graphs. A nice to have could be an error message in that case, as there is no indication that this shouldn't work. Or just strip all edges and present only the nodes.
Anyway, sorry to make a fuss :)
@gitsmol Thanks for reporting this! If it's alright with you I'd like to keep this open -- no matter what, we shouldn't panic. A helpful error message should be present.
Using the elk layout engine with non-default algorithms reliably crashes d2 when adding edges.
Running:
On this file works fine:
But this file crashes:
With error:
I've manually tried all of the algorithms elk provides and only the default one seems to compile.
Is this expected behaviour, are the other elk algo's not supported? I've looked at
layout.go
but can't spot an obvious culprit for this indexing error. Apart from the obvious suspicion thatg.Edges
doesn't contain any edges.Any pointers?