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

Theia could possibly start wrong detected task in a multi root workspace #6715

Closed
elaihau opened this issue Dec 8, 2019 · 0 comments · Fixed by #6718
Closed

Theia could possibly start wrong detected task in a multi root workspace #6715

elaihau opened this issue Dec 8, 2019 · 0 comments · Fixed by #6718
Assignees
Labels
bug bugs found in the application tasks issues related to the task system

Comments

@elaihau
Copy link
Contributor

elaihau commented Dec 8, 2019

Description

This bug was found by @RomanNikitenko #6668 (comment)

Theia could possibly start the wrong task under the conditions described below:

  • multi-root workspace
  • detected tasks having the same name are contributed by different root folders

Reproduction Steps

  1. Prepare a multi root workspace. Make sure two or more root folders contribute detected tasks that have the same name. In the GIF below, both of my root folders (i.e., test-dir and test-resource_B have npm: myWatch defined in their package.json files)

  2. Run npm: myWatch from root folder test-dir.

  3. Check which npm: myWatch was started. In the GIF below, I started npm: myWatch in test-dir, however the task history showed that npm: myWatch in test-resource_B was run.

Peek 2019-12-07 21-20

OS and Theia version:

Ubuntu 18.04, Chrome, example browser

Version b87052c

Diagnostics:

We will need to change the run() and / or runTask() API in TaskService, to allow searching detected tasks by source, scope, and task name.

@elaihau elaihau added bug bugs found in the application tasks issues related to the task system labels Dec 8, 2019
@elaihau elaihau self-assigned this Dec 8, 2019
elaihau pushed a commit that referenced this issue Dec 8, 2019
This pull request adds the support of detected tasks that have
- same label, and
- different scopes
in a multi-root workspace. This change fixes #6715.

Signed-off-by: Liang Huang <liang.huang@ericsson.com>
elaihau pushed a commit that referenced this issue Dec 10, 2019
This pull request adds the support of detected tasks that have
- same label, and
- different scopes
in a multi-root workspace. This change fixes #6715.

Signed-off-by: Liang Huang <liang.huang@ericsson.com>
elaihau pushed a commit that referenced this issue Dec 10, 2019
This pull request adds the support of detected tasks that have
- same label, and
- different scopes
in a multi-root workspace. This change fixes #6715.

Signed-off-by: Liang Huang <liang.huang@ericsson.com>
elaihau pushed a commit that referenced this issue Dec 10, 2019
This pull request adds the support of detected tasks that have
- same label, and
- different scopes
in a multi-root workspace. This change fixes #6715.

Signed-off-by: Liang Huang <liang.huang@ericsson.com>
akosyakov pushed a commit to akosyakov/theia that referenced this issue Feb 24, 2020
This pull request adds the support of detected tasks that have
- same label, and
- different scopes
in a multi-root workspace. This change fixes eclipse-theia#6715.

Signed-off-by: Liang Huang <liang.huang@ericsson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application tasks issues related to the task system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant