Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programmatically running a task in VS Code Web ignores dependsOn tasks #157041

Open
thegecko opened this issue Aug 3, 2022 · 6 comments
Open
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues web Issues related to running VSCode in the web
Milestone

Comments

@thegecko
Copy link
Contributor

thegecko commented Aug 3, 2022

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: VS Code Web v1.69.2
  • OS Version: MacOS

Steps to Reproduce:

  1. Create a custom task provider in an extension (process and shell tasks are unsupported in VS Code Web)
  2. Create a tasks.json file with multiple tasks where one dependsOn the other
  3. Contribute a command which executes the task with the dependency using vscode.tasks.executeTask(...)
  4. Open the extension in VS Code Web and execute the command

Expectation: the dependent task is executed
Outcome: it isn't

Test details...

Executing Run Task... in command pallet to start the task with dependency

  • VS Code Desktop: Works
  • vscode-test-web: Works
  • vscode.dev: Works

Executing task with dependency using custom command with vscode.tasks.executeTask(...)

  • VS Code Desktop: Works
  • vscode-test-web: Does not work (dependent task not executed)
  • vscode.dev: Does not work (dependent task not executed)

Extension reproducing this issue can be found here:

https://github.com/thegecko/web-extension-tasks

@meganrogge
Copy link
Contributor

Tasks are currently not supported in the web, so this is expected

@meganrogge meganrogge added the *as-designed Described behavior is as designed label Aug 4, 2022
@vscodenpa
Copy link

The described behavior is how it is expected to work. If you disagree, please explain what is expected and what is not in more detail. See also our issue reporting guidelines.

Happy Coding!

@thegecko
Copy link
Contributor Author

thegecko commented Aug 4, 2022

Tasks are currently not supported in the web, so this is expected

Tasks run in the web version fine, the feedback is that explicitly shell and process type tasks won't work.

If tasks are not intended to run in the web, then this expectation should be set accordingly by removing the related commands and showing feedback to the user to this affect. Currently the only feedback pertains to none-custom task providers.

@meganrogge meganrogge reopened this Sep 1, 2022
@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug tasks Task system issues web Issues related to running VSCode in the web confirmation-pending and removed *as-designed Described behavior is as designed labels Sep 1, 2022
@meganrogge meganrogge added this to the Backlog milestone Sep 22, 2022
@meganrogge
Copy link
Contributor

This might be fixed in insider's tomorrow - there were some changes to the handling of dependent tasks

@thegecko
Copy link
Contributor Author

This might be fixed in insider's tomorrow - there were some changes to the handling of dependent tasks

Thanks @meganrogge

I've re-tested this in vscode.dev insiders (Version: 1.79.0-insider) and unfortunately still see the issue.

In vscode.dev, if you have a task which dependsOn another task, both will be executed if the leaf task is executed with the Tasks: Run Task command, but only one executes if the same task is invoked programmatically using vscode.tasks.executeTask(...).

@thegecko
Copy link
Contributor Author

This bug is also apparent when execution debugging programatically. e.g. any preLaunchTask seems to be ignored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues web Issues related to running VSCode in the web
Projects
None yet
Development

No branches or pull requests

3 participants