You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a graph G contains a set of edges, G.Edges() most of the time returns the set deterministically (the first edge starts from the root ie. the first node added in the graph, etc.) but that doesn't happen all the time. See #6246 (comment)
Currently there is no place in our graph code where we are based on the way Edges() returns edges, except Fprint which 1) we don't use anywhere, 2) probably has another bug (note that we always print the From node) too.
There is no guarantee of ordering for edges. Code that relies on ordering is improper. If calling code needs ordering, it can choose the order it wants.
In the case of Fprint if ordering has value (and I accept that it might), enforce ordering there. Since its dead, I'd just as soon see the method deleted.
@deads2k so what do you want to do with this issue? Remove Fprint, godoc Edges explaining what's what, and close, or you have any graph api changes in mind?
@deads2k so what do you want to do with this issue? Remove Fprint, godoc Edges explaining what's what, and close, or you have any graph api changes in mind?
Remove Fprint and godoc the method explaining the lack of ordering. Lacking a proper Set, I think that returning a map is even less clear.
Activity
deads2k commentedon Dec 18, 2015
There is no guarantee of ordering for edges. Code that relies on ordering is improper. If calling code needs ordering, it can choose the order it wants.
In the case of
Fprintif ordering has value (and I accept that it might), enforce ordering there. Since its dead, I'd just as soon see the method deleted.deads2k commentedon Dec 18, 2015
Ok, I see why it seems like there should be. Bad API shape in the library we pulled in. There's still no natural ordering.
0xmichalis commentedon Dec 18, 2015
@deads2k so what do you want to do with this issue? Remove
Fprint, godocEdgesexplaining what's what, and close, or you have any graph api changes in mind?deads2k commentedon Dec 18, 2015
Remove Fprint and godoc the method explaining the lack of ordering. Lacking a proper
Set, I think that returning amapis even less clear.