Vscode: Sequential execution of dependent tasks

Created on 14 Sep 2018  路  9Comments  路  Source: microsoft/vscode

When declaring a task to depend on other tasks via dependsOn array tag there is no way to specify the dependent tasks to run in sequential order. At the moment they all run in parallel at once. I think it would be useful feature to be able to specify task execution order as seq or async.

An example of this would be CMake project where you have separately specified tasks to configure, build, run tests and finally run the built project. Then you want to combine those tasks into single task and they have to execute in order.

Note: this is partially duplicated issue of #53339

feature-request on-testplan tasks

Most helpful comment

In fact, in it's current state the 'dependsOn' property is a bit misleading since all process will run in parallel. The hability to make them go in sequence would be very appreciated. When one says 'dependent', it means (in my head, anyways) that process 'C' will only run if processes 'A' and 'B' completed sucessfully. Would be neat to have that behavior implemented.

All 9 comments

You can always put them in sequence. So if you want the order A, B C, make C depend on B and B depend on A. Is this not working for you?

Yes this works, but then you get hierarchy dependency and you can't run separate task without running the parent task first. Say D is combination of A, B, C and you want to run them in order when D is executed but when C alone is executed you do not want to also run A and B.

If I broaden previous CMake example usually during the active development you don't want to always run tests before executing built project. In current case you would either have to run test task first or make a new task that only executes build and run tasks in order. This adds a lot of unnecessary boilerplate code to the task scheme.

Adding to the above, if I have different configurations, I also would have to create each of those chains and standalone tasks for each configuration as well, even if some of the other tasks are identical. I.e. if I have tasks A1/A2/A3, B, C, D, then I have to create three totally separate chains of dependencies, plus the separate tasks to run each step without dependencies.

I also would love to see this.
Just add a dependsOnOrdered option that runs tasks sequentially and all in the same terminal.

I also need the sequential behavior. I am working with docker commands based tasks where I need build and run tasks separately defined without dependencies and also define a task where first it build and then run.

In fact, in it's current state the 'dependsOn' property is a bit misleading since all process will run in parallel. The hability to make them go in sequence would be very appreciated. When one says 'dependent', it means (in my head, anyways) that process 'C' will only run if processes 'A' and 'B' completed sucessfully. Would be neat to have that behavior implemented.

I would very much like this. For a very simple example I would like to have a build task, a run task and a build and run task that does build followed by run without having to duplicate the commands for either of the tasks. Afak this is not possible currently

dependson should have the default behaviour of serial and have parallel as an option. Specifying an array implies to the end user that the dependencies will be satisfied in order.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NikosEfthias picture NikosEfthias  路  3Comments

biij5698 picture biij5698  路  3Comments

sirius1024 picture sirius1024  路  3Comments

VitorLuizC picture VitorLuizC  路  3Comments

lukehoban picture lukehoban  路  3Comments