-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Finalize Task API #49806
Comments
@alpaix and @rickvanprim I added events to the task execution that signals when the underlying process starts and when it ends. The start contains the process id, the end the exitCode. Please let me know if this will work for you (minus the polling for now). See also #49665 |
Some changes after having an API review:
The API looks like this now: /**
* Namespace for tasks functionality.
*/
export namespace tasks {
/**
* Register a task provider.
*
* @param type The task kind type this provider is registered for.
* @param provider A task provider.
* @return A [disposable](#Disposable) that unregisters this provider when being disposed.
*/
export function registerTaskProvider(type: string, provider: TaskProvider): Disposable;
/**
* Fetches all tasks available in the systems. This includes tasks
* from `tasks.json` files as well as tasks from task providers
* contributed through extensions.
*
* @param filter a filter to filter the return tasks.
*/
export function fetchTasks(filter?: TaskFilter): Thenable<Task[]>;
/**
* Executes a task that is managed by VS Code. The returned
* task execution can be used to terminate the task.
*
* @param task the task to execute
*/
export function executeTask(task: Task): Thenable<TaskExecution>;
/**
* The currently active task executions or an empty array.
*
* @readonly
*/
export let taskExecutions: ReadonlyArray<TaskExecution>;
/**
* Fires when a task starts.
*/
export const onDidStartTask: Event<TaskStartEvent>;
/**
* Fires when a task ends.
*/
export const onDidEndTask: Event<TaskEndEvent>;
/**
* Fires when the underlying process has been started.
* This event might not fire for tasks that don't
* execute an underlying process.
*/
export const onDidStartTaskProcess: Event<TaskProcessStartEvent>;
/**
* Fires when the underlying process has ended.
* This event might not fire for tasks that don't
* execute an underlying process.
*/
export const onDidEndTaskProcess: Event<TaskProcessEndEvent>;
} |
@dbaumer I'll be happy to migrate as soon as it's available. What's the timeline for enabling the new API in insiders and public? When will it be available for testing? |
@alpaix I pushed it today. Will be available in insider tomorrow. |
@alpaix I pushed a change today that adds the above API to vscode.d.ts (namespace tasks). I left the old workspace API in proposed but I would like to remove it until end of the week. Can you confirm that you moved to the new task namespace. |
@dbaeumer We've decided not to support older proposed API as the Live Share remote tasks functionality is an experimental feature. We'll release a final revision along with the latest stable Task API when it's available in non-insiders VSCode version. It's okay to remove the proposed API. |
@alpaix thanks. I will remove the API then. |
The text was updated successfully, but these errors were encountered: