eclipse / elk

Eclipse Layout Kernel - Automatic layout for Java applications.
https://www.eclipse.org/elk/
Other
258 stars 86 forks source link

Fixes Self-loop label bug when using compaction #1081

Closed Eddykasp closed 2 weeks ago

Eddykasp commented 1 month ago

Self-loop labels were previously omitted during compaction. This PR moves them together with everything else.

Eddykasp commented 1 month ago

This looks good. Do you think that a test would be a good idea for compaction?

I looked into the current tests for compaction and they are only algorithmic tests on the CGraph i.e. not on the underlying graph elements. It would probably be good to add such a test to check that compaction has been properly applied to all elements of the graph. This would help avoid bugs such as this in the future, but I'm not sure what the best approach for that would be. Maybe we could merge this fix now, and open an issue to add better compaction tests in the future.