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

Support background tasks #6534

Closed
tolusha opened this issue Nov 12, 2019 · 3 comments
Closed

Support background tasks #6534

tolusha opened this issue Nov 12, 2019 · 3 comments
Labels
debug issues that related to debug functionality tasks issues related to the task system vscode issues related to VSCode compatibility

Comments

@tolusha
Copy link
Contributor

tolusha commented Nov 12, 2019

Description

We have Task.isBackground [1] which is supposed to use for background tasks.

[1] https://github.com/eclipse-theia/theia/blob/master/packages/plugin/src/theia.d.ts#L8304

/** The task's name */
name: string;
/** The task's definition. */
definition: TaskDefinition;
/** The task's scope. */
scope?: TaskScope.Global | TaskScope.Workspace | WorkspaceFolder;
/** The task's execution engine */
execution?: ProcessExecution | ShellExecution;
/** Whether the task is a background task or not. */
isBackground?: boolean;
/**
* A human-readable string describing the source of this
* shell task, e.g. 'gulp' or 'npm'.
*/
source?: string;
/**
* The task group this tasks belongs to. See TaskGroup
* for a predefined set of available groups.
* Defaults to undefined meaning that the task doesn't
* belong to any special group.
*/
group?: TaskGroup;
/** The presentation options. Defaults to an empty literal. */
presentationOptions?: TaskPresentationOptions;
/**
* The problem matchers attached to the task. Defaults to an empty
* array.
*/
problemMatchers?: string[];

Context

I try to adopt quarkus extension. This extension generates preLaunch task which is a background one. It means Theia should launch the task and then start a debug session without waiting when task is finished.

[1] https://github.com/redhat-developer/vscode-quarkus

@tolusha tolusha added tasks issues related to the task system vscode issues related to VSCode compatibility debug issues that related to debug functionality labels Nov 12, 2019
@tsmaeder
Copy link
Contributor

The todo's here are:

  1. The debugger should not wait for tasks that are marked "background"
  2. Problem matchers should fire events when matching certain start/end patterns. The debugger (task watcher) needs to listen to those issues and act accordingly.

@tsmaeder
Copy link
Contributor

The issue is that the debugger does not start the debug session, but first waits for the background task to finish. The debugger should listen for the "task finished" event (exact name will be different, see VS Code doc), and then start the debug session.

@ShimonBenYair
Copy link
Contributor

ShimonBenYair commented Nov 28, 2019

Hi @tsmaeder

I am currently working on it as part of the #5517 Support Compound tasks
I will send a pull request on few days ...

akosyakov pushed a commit to akosyakov/theia that referenced this issue Feb 24, 2020
…lipse-theia#5517 and also Fixes eclipse-theia#6534

Signed-off-by: Shimon Ben Yair <shimon.ben.yair@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug issues that related to debug functionality tasks issues related to the task system vscode issues related to VSCode compatibility
Projects
None yet
Development

No branches or pull requests

3 participants