-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: running same task twice #29
Comments
Here's my analysis:
So is the problem when a |
Only composite tasks can call other tasks. So the concern is that in the call chain you somehow end up calling yourself again. Here's the simplest loop: [scripts]
loop = ["loop"]
# loop => loop ... If a |
Here's a more complicated loop: [scripts]
a = ["b"]
b = ["a"]
# a=> b => a => b... Ok, so far so good. |
What about a more real-world use case: [scripts]
clean = ["rm -rf build", "rm build-artifacts"]
build = "touch build/$1"
run = ["clean", "build foo", "mv foo new-location", "clean"] In this case, |
While I was figuring out #21, I ended up adding in logic to prevent circularity. However, this also prevents the same task from running twice. But, ironically, having #21 done meant that it is easy to define a task with an argument and then have other tasks call it with different arguments.
clean
,mkdir build
,build foo
,echo 'Done'
(skipsbuild bar
)The text was updated successfully, but these errors were encountered: