nat-n / poethepoet

A task runner that works well with poetry.
https://poethepoet.natn.io/
MIT License
1.4k stars 58 forks source link

sequence ignores dependencies of its steps #168

Closed oefe closed 11 months ago

oefe commented 11 months ago

When a sequence tasks contains steps with dependencies, these dependencies should be executed as part of the sequence, but they don't.

Example (paste into a pyproject.toml):

[tool.poe.tasks._a1]
help = "Dependency 1 of task a"
cmd = "echo a1"

[tool.poe.tasks._a2]
help = "Dependency 2 of task a"
cmd = "echo a2"

[tool.poe.tasks.a]
help = "Task a"
cmd = "echo a"
deps = ["_a1", "_a2"]

[tool.poe.tasks.b]
help = "Task b"
cmd = "echo b"

[tool.poe.tasks.ab]
help = "Sequence of tasks a and b"
sequence = ["a", "b"]

When the task a is executed standalone, it's dependencies are executed as expected:

> poe a
Poe => echo a1
a1
Poe => echo a2
a2
Poe => echo a
a

However, when executing the combined task ab, the dependencies are not executed:

> poe ab
Poe => echo a
a
Poe => echo b
b

Expectation would be that running the combined task ab also runs the dependencies, just like running the steps individually.

nat-n commented 11 months ago

Hi @oefe, thanks for reporting this issue! I'll try get it fixed at the next opportunity.

nat-n commented 11 months ago

This is now fixed in v0.24.0 🚀