[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Dependency tree resolver in Lua?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 7 Feb 2011 10:02:51 -0200
> The code is trivial: construct a directed graph of dependencies, where
> each node has edges pointing at the nodes it depends on. Now search the
> graph for a node with no parents. Remove the node (while building,
> logging, outputting it, or whatever). Repeat until there are no nodes
> left. For extra credit check the graph for cycles first.
Aka topological sorting: