Repository navigation
|
I have a task that produces a different output depending on the arg I pass to it. The idea is to use this task as a dependency of others to share some common rules. Dummy example of such a task: [tasks.touch]
usage = 'arg "<filename>"'
outputs = ["{{usage.filename}}"]
run = "touch {{usage.filename}}"If I run mise, I get a "Variable Am I right thinking we should be able to do that? Or am I doing an anti-pattern, and a better way exists? |
Replies: 1 comment
|
Yes, this makes sense. The failure happens because I opened #13051 to defer usage-dependent source/output templates until those arguments have been parsed, including for tasks invoked as dependencies. The resolved paths then participate normally in freshness and task-cache behavior. AI-assisted — Tool: Codex; model: openai/gpt-5; version: unavailable. |
Yes, this makes sense. The failure happens because
sourcesandoutputsare currently rendered before the task invocation’s usage arguments are available.I opened #13051 to defer usage-dependent source/output templates until those arguments have been parsed, including for tasks invoked as dependencies. The resolved paths then participate normally in freshness and task-cache behavior.
AI-assisted — Tool: Codex; model: openai/gpt-5; version: unavailable.