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

vscode.tasks.executeTask ignores dependsOn #101884

Closed
ejizba opened this issue Jul 7, 2020 · 3 comments
Closed

vscode.tasks.executeTask ignores dependsOn #101884

ejizba opened this issue Jul 7, 2020 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release tasks Task system issues verified Verification succeeded
Milestone

Comments

@ejizba
Copy link
Member

ejizba commented Jul 7, 2020

Issue Type: Bug

This seems to be a regression on VS Code Insiders. It does not repro on stable. If I call vscode.tasks.executeTask, it will only execute that specific task, not the task it dependsOn as well. Here's an example tasks.json:

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "echo",
            "type": "shell",
            "dependsOn": "echo2",
            "command": "echo Hello",
            "problemMatcher": []
        },
        {
            "label": "echo2",
            "type": "shell",
            "command": "echo Hello2",
            "problemMatcher": []
        }
    ]
}

Example code to execute the task:

const tasks = await vscode.tasks.fetchTasks();
await vscode.tasks.executeTask(tasks[0]);

Expected

> Executing task: echo Hello2 <
Hello2
Terminal will be reused by tasks, press any key to close it.
> Executing task: echo Hello <
Hello
Terminal will be reused by tasks, press any key to close it.

Actual:

> Executing task: echo Hello <
Hello
Terminal will be reused by tasks, press any key to close it.

VS Code version: Code - Insiders 1.47.0-insider (e95f9e6, 2020-07-07T07:46:45.605Z)
OS version: Darwin x64 19.5.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz (12 x 2600)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) 2, 3, 3
Memory (System) 16.00GB (0.05GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (17)
Extension Author (truncated) Version
vscode-pull-request-github Git 0.17.0
vscode-azureappservice ms- 0.17.1-alpha
vscode-azureresourcegroups ms- 0.2.0
vscode-azurestorage ms- 0.9.0
vscode-cosmosdb ms- 0.13.0
csharp ms- 1.22.1
python ms- 2020.6.91350
remote-containers ms- 0.127.0
remote-ssh ms- 0.51.0
remote-ssh-edit ms- 0.51.0
azure-account ms- 0.8.11
powershell ms- 2020.6.0
vscode-typescript-tslint-plugin ms- 1.2.3
java red 0.64.0
vscode-didact red 0.1.15
sort-lines Tyr 1.9.0
vscode-java-debug vsc 0.26.0
@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release labels Jul 8, 2020
@alexr00 alexr00 added this to the June 2020 milestone Jul 8, 2020
@alexr00 alexr00 added the tasks Task system issues label Jul 8, 2020
@alexr00
Copy link
Member

alexr00 commented Jul 8, 2020

Caused by 1abf21d. Because the task execution is first gotten, then passed to the extension host, the depends on is lost when passing to the extension host.

@ejizba
Copy link
Member Author

ejizba commented Jul 8, 2020

Works for me on the latest insiders, thanks!

@alexr00
Copy link
Member

alexr00 commented Jul 9, 2020

Thank you for verifying!

@alexr00 alexr00 added the verified Verification succeeded label Jul 9, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release tasks Task system issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants