mirror of https://github.com/natnat-mc/moonbuild
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
350 B
16 lines
350 B
class Executor
|
|
@getmaxparallel: => 1
|
|
|
|
new: (@dag, @nparallel) =>
|
|
|
|
execute: (opts) =>
|
|
block = @dag\buildablenodes!
|
|
while #block != 0
|
|
for node in *block
|
|
node\build opts
|
|
node\updatecache!
|
|
node.built = true
|
|
block = @dag\buildablenodes!
|
|
|
|
for name, node in pairs @dag.nodes
|
|
error "Node #{name} wasn't built" unless node.built
|
|
|