Comments (3)
This parameter would be a redundant feature. For you it will make the syntax
"better". For some other users it may be confusing. A redundant feature, as
such, may exist. But there must be really good reasons for it.
Let me try to explain the reasoning of the design. First of all, the used term
"task dependency" is not quite right for Invoke-Build tasks. Unlike other tasks
runners, it uses the original (perhaps unique) concept of jobs, where jobs are
task references and own actions in any required order.
This covers the classic "task dependency" scenarios
task Foo Bar, { }
but it is not limited to them. For example, in this case
task Foo { }, Bar
it is not quite right to say Foo
depends on Bar
, because Bar
is invoked
after the own action of Foo
. The task Bar
is a post task, continuation.
Such cases are less frequent but they exist and they are supported.
Also, you can do something "crazy" (if you need, of course):
task Main Task1, { }, Task2, { }, Task3
This is also good for potential future changes. For a given task X with jobs,
you may move its action to a separate task and replace it with this task
reference. Or a task reference may be replaced with an action. Or you
may reorder, add, remove jobs. In any case, the syntax of X does not
change, just its job list changes.
So the syntax is driven by the concept of flexible jobs instead of the rigid
approach task -depends -action
. The syntax also turns out to be concise,
which is probably good, but this was not the goal at all.
If you like you may use the parameter name -Jobs
explicitly to emphasize
that its argument is an array and commas are expected. It is just a matter of
time to get used to the syntax and think in terms of "jobs", not "dependencies".
from invoke-build.
In other words, different concepts require different parameters.
A task in psake is a named list of dependencies and one action where
dependencies are task references. So it reflects this concept by two task
parameters, Depends
and Action
. (It also has PreAction
and PostAction
).
A task in Invoke-Build is a named list of jobs where jobs are task references
and actions in any required number and order. So it reflects this concept by
one parameter, Jobs
. It would be unnatural to support an extra parameter
Depends
just because another tool uses it due to the different concept.
(Note that PreAction
and PostAction
are also covered by Jobs
).
from invoke-build.
Thanks for the detailed reply. It covers off concept of jobs nicely and the subtle differences compared to dependencies in other task system. I'll try out -Jobs
anyway.
from invoke-build.
Related Issues (20)
- Amend output on task errors.
- Reusing or sharing tasks HOT 5
- ib.cmd ? ignores a specified file
- vscode outline view: no symbols found in document HOT 2
- Different module and package versions HOT 2
- Parallel execution based on dependency tree HOT 2
- invoke-build discovery fails in powershell container HOT 3
- Please consider adding -Computername and -Session parameter to Task HOT 8
- GitHub action output is not colored
- Color and formatting text in Azure DevOps Pipelines HOT 8
- Use-BuildEnv should make parameters mandatory
- Invoke-BuildExec spitting out service principal secret as current directory HOT 6
- Exec doesn't work well with forward slash arguments HOT 7
- Use `[System.Management.Automation.Cmdlet]::CommonParameters` to get the names of all common parameters HOT 3
- Task condition does not work HOT 8
- Build-Parallel writes only to Output stream HOT 7
- property 'File' cannot be found on this object HOT 17
- Do not wrap internal errors in Resolve-MSBuild
- Fix cryptic errors on unknown parameters
- Invoke-BuildExec should pass the original stderr error to the thrown terminating error HOT 38
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from invoke-build.