Method: Build::Graph::Walker#enter

Defined in:
lib/build/graph/walker.rb

#enter(task) ⇒ Object



146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/build/graph/walker.rb', line 146

def enter(task)
	@logger.debug{"--> #{task.node.process}"}
	
	@tasks[task.node] = task
	
	# In order to wait on outputs, they must be known before entering the task. This might seem odd, but unless we know outputs are being generated, waiting for them to complete is impossible - unless this was somehow specified ahead of time. The implications of this logic is that all tasks must be sequential in terms of output -> input chaning. This is not a problem in practice.
	if outputs = task.outputs
		outputs.each do |path|
			@outputs[path.to_s] = []
		end
	end
end