Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial Orderings #133

Open
3 tasks
mjpitz opened this issue Oct 28, 2020 · 2 comments
Open
3 tasks

Partial Orderings #133

mjpitz opened this issue Oct 28, 2020 · 2 comments

Comments

@mjpitz
Copy link
Member

mjpitz commented Oct 28, 2020

In investigating #131 yesterday, I noticed that part of our client-side code is incomplete. As a result, queries for a topology can return partial orderings instead of correct orderings.

How does this happen?

The most common way this comes up is when there is a cycle in the graph. Cycles in graphs introduce complications. For one, it's possible that there is no correct ordering.

Current Situation

When the deps command-line tool runs, it will output an ordering. We currently do not provide any feedback that the ordering is partial or correct. We don't provide a sense of how many modules are omitted.

Improvements

  • set run to a non-error status code when the output is a partial ordering (determined by the remaining entries in the map)
  • support outputting information to a file
  • Update traversal logic to better account for this case. For example, some cycles can be addressed by re-running a loop. Another option could be to switch the topological sort over to using depth-first search. It might be able to handle some of these cases that breadth-first can't handle well.
@mjpitz
Copy link
Member Author

mjpitz commented Oct 28, 2020

@mkw for visibility

@mjpitz
Copy link
Member Author

mjpitz commented Jun 4, 2021

In v1beta, I've noticed this far less often. I suspect it's due to the improved data model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant