Summary
When running:
vp run <task> <extra-args...>
the extra args are also forwarded to dependsOn tasks.
I think this should not be the default.
Rationale
A common pattern is:
test depends on build
check depends on build
But the accepted args are often different.
For example:
test may accept a file path or filter
build may accept no extra args
So this:
can end up passing some-filter to build too, even though it only makes sense for test.
That makes dependsOn harder to use for build-before-test or build-before-check workflows.
Proposal
By default:
- extra args should be passed only to the explicitly requested task
dependsOn tasks should not receive them
So:
should pass some-filter to test, but not to build.
If there is a use case for the current behavior, an explicit opt-in would make more sense than the current default.
Minimal repro
https://github.com/SegaraRai/vitetask-repro02
Summary
When running:
the extra args are also forwarded to
dependsOntasks.I think this should not be the default.
Rationale
A common pattern is:
testdepends onbuildcheckdepends onbuildBut the accepted args are often different.
For example:
testmay accept a file path or filterbuildmay accept no extra argsSo this:
vp run test some-filtercan end up passing
some-filtertobuildtoo, even though it only makes sense fortest.That makes
dependsOnharder to use for build-before-test or build-before-check workflows.Proposal
By default:
dependsOntasks should not receive themSo:
vp run test some-filtershould pass
some-filtertotest, but not tobuild.If there is a use case for the current behavior, an explicit opt-in would make more sense than the current default.
Minimal repro
https://github.com/SegaraRai/vitetask-repro02