Topological Sort
Ordering a dependency graph so nothing is built before what it needs, demoing the p/moul/x/daily/toposort library.
A graph with a cycle
auth <- session
server <- auth
session <- auth
Sort returns an error: toposort: graph has a cycle
Ordered before giving up: nothing
Stuck on the cycle: auth, server, session
The nodes still stuck are named rather than silently dropped, so a caller can report exactly which dependencies are tangled.