Open lundmark opened 8 years ago
This should probably look something like this instead:
local depgraph = require 'tundra.depgraph'
function _mt:create_dag(env, data, deps)
return depgraph.make_node {
Env = env,
Pass = data.Pass,
Label = "MyCompiler $(@)",
Action = "echo", --"$(MYACTION)",
Inputs = data.Sources,
Outputs = {},
Dependencies = deps,
}
end
However, the notation of $(@) and $(<) seem undocumented (at least I can't find anything in the tundra-manual.html). When those are and aren't usable would be very good to document.
It shouldn't be Inputs / Outputs, it should be InputFiles / OutputFiles.
Is it possible to get ConfigInvariant working on your own Unit Extension somehow?
When trying to use the documentation on Unit Script Template to create my own Unit Type, it seems to fail to use the code provided.
My definition:
But when trying to run MyCompiler then I get that when trying to create the dag, it calls the :create_dag-function where the make_node function doesn't exist.
(attempt to call method 'make_node' (a nil value))
It would be really awesome if there would be an example of how to get this working in the examples/directory