-
Notifications
You must be signed in to change notification settings - Fork 26
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
Required tasks should inherit inputs (Or be able to map inputs for task X to inputs for required task Y) #103
Comments
I can see the issue you are raising here. Let's workshop some potential solutions. I think each task should expresss it's own inputs, so the first example you provided I believe should fail as task You should be able to create Requires statements that contain inputs:
But this doesn't help if you would like to have the input to y be dynamic. Maybe if an input is named the same as an input on a required task, it should be mapped? |
What about if requires inputs are expanded:
|
I think the second idea is better, because it is more explicit and seems easier to understand. I'd thought the first idea would probably be easier to implement, and possibly simpler to use. |
I was looking at the issues here, having a similar use-case, where I would like to change the behavior of a dependency/requirement depending on which task it triggers. The second solution could work, but I was more thinking of inheriting environment variables of parent tasks, but since this could break existing setups, maybe introduce the concept of "global" environment variables, which could both be set directly under the |
Given:
X
with zero or more inputsY
with one or more inputsrequires
relationship fromX
toY
When:
X
with inputs needed for taskY
Then:
Y
should have access to inputs provided when running taskX
For example, given a readme:
Tasks
y
Inputs: v
x
Requires: y
this invocation will work:
v=hello xc x
but this one will fail:
xc x hello
Likewise, this readme will also fail in the same way as described above:
Tasks
y
Inputs: v
x
Inputs: v
Requires: y
The text was updated successfully, but these errors were encountered: