Skip to content

Could the depends-on -> list -> { task = "{{ a_task_name }}", ... } be supported? #4042

@phreed

Description

@phreed

Instead of s: &str could this be s: TemplateString? so that the { task = "{{ a_task_name }}", ... } could be supported?

_Originally posted in

I think the change is primarily in this section of the code.

Here is what it might look like in a pixi.toml.

[tasks.build]
args = [
    { arg = "pkg", default = "dummy" },
    { arg = "tgt_platform", default = "linux-64" }
]
cmd = [ ... ]

[tasks.build-force]
args = [
    { arg = "pkg", default = "dummy" },
    { arg = "tgt_platform", default = "linux-64" }
]
cmd = [ ... ]

[tasks.publish]
args = [
    { arg = "pkg", default = "dummy" },
]
cmd = [ ... ]

[task.for-each]
args = [
  { arg = "the_task", default = "build"},
  { arg = "tgt_platform", default = "linux-64"}
]
depends-on = [
  { task = "{{ the_task }}", args = ["foo", "{{ tgt_platform }}"],
  ...
]

[tasks.build-all]
depends-on = [ { task = "for-each", args = ["build"] } ]

[tasks.publish-all]
depends-on = [ { task = "for-each", args = ["publish"] } ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    UXRelated to the User Experience of pixiarea:tasksRelated to pixi tasksenhancementNew features

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions