graphia-app / graphia

A visualisation tool for the creation and analysis of graphs
https://graphia.app
233 stars 20 forks source link

GML parser seems to assume that node definitions come before edge definitions #21

Closed nsajko closed 3 years ago

nsajko commented 3 years ago

Currently giving Graphia a GML file whose nodes are not defined before their edges causes causes failure with a nondescriptive error. Example GML:

graph [
 Creator "me" directed 1 label "some graph"
  node [
   id 1
  ]
  edge [
   source 1
   target 2
  ]
  node [
   id 2
  ]
]

This is in clear contradiction with a GML specification that I found here: https://web.archive.org/web/20190303094704/http://www.fim.uni-passau.de:80/fileadmin/files/lehrstuhl/brandenburg/projekte/gml/gml-technical-report.pdf

You should make the error message more descriptive at the very least.

I wouldn't even mind Graphia being noncompliant to GML, but in that case the requirement for node definitions to come before edge definitions should be documented.