tweag / nixpkgs-graph-explorer

Explore the nixpkgs dependency graph
MIT License
15 stars 0 forks source link

In some cases, the direction of the edges in the graph is reversed compared to the results obtained from the Gremlin query. #27

Closed zz1874 closed 1 year ago

zz1874 commented 1 year ago

Describe the bug When generating a graph of multiple layers, it happens that the direction of the edges in the graph is reversed compared to the results obtained from the Gremlin query. But if we generate a graph with one single edge, the direction is not reversed.

To Reproduce If we put in a Gremlin query like

g.V().has('pname','gtk+3')
.repeat(outE().inV().simplePath())
.until(has('pname','libGL'))
.path()
.by('pname')
.by('label')

to generate the dependency graph between gtk+3 and libGL, the result would be Screenshot from 2023-02-17 13-12-49@2x .

However, if we generate the dependency graph between libepoxy and libGL by querying

g.V().has('pname','libepoxy')
.repeat(outE().inV().simplePath())
.until(has('pname','libGL'))
.path()
.by('pname')
.by('label')

, the result would be Screenshot from 2023-02-17 13-13-29@2x

Expected behavior In the first graph, the edge between libepoxy and libGL should be directed from libepoxy to libGL instead of the reversed way.

Environment

Additional context There aren't any other additional contexts.