-
Notifications
You must be signed in to change notification settings - Fork 34.8k
Closed
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityon-testplantasksTask system issuesTask system issues
Milestone
Description
- VSCode Version: 1.15.1
- OS Version: Fedora 26 (x86_64)
Steps to Reproduce:
- Create a new extension
- Register a
taskProvider
that provides incomplete tasks inprovideTasks()
and completes them inresolveTask
- Launch the extension and list tasks in the command palette
Here is a minimal example:
'use strict';
import * as vscode from 'vscode';
export function activate(context: vscode.ExtensionContext) {
let provider = vscode.workspace.registerTaskProvider('test', {
provideTasks: () => [new vscode.Task({ type: 'test' }, 'test', 'source')],
resolveTask: (task: vscode.Task) => {
task.execution = new vscode.ShellExecution('echo Hello');
return task;
}
});
context.subscriptions.push(provider);
}
export function deactivate() {
}
Reproduces without extensions: Yes
As I understand, resolveTask()
should be called to complete incomplete tasks just like with code lenses: provideCodeLenses()
can return incomplete code lenses that will be later completed upon calling resolveCodeLens()
.
However, resolveTask()
never seems to be called at any point, and if provideTasks()
returns incomplete tasks, these tasks will simply not get listed when trying to list all available tasks.
Am I missing something on how resolveTask()
is supposed to work, or is there a bug here ? I've tried looking at other task providers, but every single one of them only use provideTasks()
.
joelday and 74th
Metadata
Metadata
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityon-testplantasksTask system issuesTask system issues