Closed stijnopheide closed 7 years ago
It looks like dependent tasks are executed asynchronously, which violates the ordering of dependencies.
Minimal example
{ task1 { product "task1.txt" novelty (not (mach.core/file-exists? product)) produce #$ ["sleep" "5" "&&" "echo" "'test'" ">" product] } task2 { product "task2.txt" novelty (not (mach.core/file-exists? product)) depends [task1] produce #$ ["sleep" "2" "&&" "cp" "task1.txt" "task2.txt"] } }
$ mach task2
$ sleep 5 && echo 'test' > task1.txt $ sleep 2 && cp task1.txt task2.txt cp: task1.txt: No such file or directory Writing task2.txt Writing task1.txt
Thanks for raising, and thanks for the PR
It looks like dependent tasks are executed asynchronously, which violates the ordering of dependencies.
Minimal example
Machfile.edn
Execute task2
Output