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

"configure task" should not add duplications to task.json #5719

Closed
elaihau opened this issue Jul 16, 2019 · 3 comments · Fixed by #5777
Closed

"configure task" should not add duplications to task.json #5719

elaihau opened this issue Jul 16, 2019 · 3 comments · Fixed by #5777
Assignees
Labels
bug bugs found in the application tasks issues related to the task system

Comments

@elaihau
Copy link
Contributor

elaihau commented Jul 16, 2019

Description

Configuring the same task multiple time adds duplications to the tasks.json file

Peek 2019-07-16 00-23

In VS code, if a detected task has been customized, the user won't be able to add a second customized config to tasks.json.

Reproduction Steps

  1. take npm install for example, open "Run tasks"
  2. configure npm install
    3, repeat step 1 and 2
    4, check data in tasks.json

what happened: there are more than one objects added to tasks.json for npm install
what should happen: duplicated customization for the same detected task should be avoided

@elaihau elaihau self-assigned this Jul 16, 2019
@elaihau elaihau added bug bugs found in the application tasks issues related to the task system labels Jul 16, 2019
@RomanNikitenko
Copy link
Contributor

It's strange...
I checked this case when I added 'Configure' action.
It looks like a regression...

@RomanNikitenko
Copy link
Contributor

RomanNikitenko commented Jul 16, 2019

@elaihau
I'm tried to understand what could bring the regression and found that maybe this PR changed the behavior.
WDYT?

So to check it, I did git reset --hard 7fe439a30d53846a82d6b0c916de5a69b9da2c77 (commit before the changes from PR)
It works well - after configuring the task is displayed as configured and it's impossible to add the same task twice.
Please see video: https://youtu.be/IQIeQugBeH0

Then I updated my branch to commit with changes from the PR, so git reset --hard abd631fb173387dd558e2c616961490369c6987a
After configuring the task is displayed as detected and it's possible to add the same task twice.
Please see video: https://youtu.be/E8nBofxhEQc

So if source of the issue is identified correctly, maybe it can help to speed up fixing of the bug...

@elaihau
Copy link
Contributor Author

elaihau commented Jul 17, 2019

Thank you for the diagnosis @RomanNikitenko , it is really helpful !

I will see what my commit breaks and fix it asap.

elaihau pushed a commit that referenced this issue Jul 23, 2019
- The detected tasks, once customized, should be displayed as configured tasks in the quick open. (fixed #5747)
- The same task shouldn’t have more than one customization. Otherwise it would cause ambiguities and duplication in tasks.json (fixed #5719)

Signed-off-by: Liang Huang <[email protected]>
elaihau pushed a commit that referenced this issue Jul 23, 2019
- The detected tasks, once customized, should be displayed as configured tasks in the quick open. (fixed #5747)
- The same task shouldn’t have more than one customization. Otherwise it would cause ambiguities and duplication in tasks.json (fixed #5719)

Signed-off-by: Liang Huang <[email protected]>
elaihau pushed a commit that referenced this issue Jul 24, 2019
- edit the right task.json when clicking "configure task" in multi-root
workspace (fixed #4919)

- in the current Theia, when users configure a detected task, the entire
task config is written into tasks.json, which introduces redundancy.
With this change, only properties that define the detected task, plus `problemMatcher`, are
written into tasks.json. (fixed #5679)

- `TaskConfigurations.taskCustomizations` is a flat array, and the user can only customize one type of detected task in one way.
With this change Theia supports having different ways of task customization in different root folders.

- The detected tasks, once customized, should be displayed as configured tasks in the quick open. (fixed #5747)

- The same task shouldn’t have more than one customization. Otherwise it would cause ambiguities and duplication in tasks.json (fixed #5719)

Signed-off-by: Liang Huang <[email protected]>
elaihau pushed a commit that referenced this issue Jul 24, 2019
- edit the right task.json when clicking "configure task" in multi-root
workspace (fixed #4919)

- in the current Theia, when users configure a detected task, the entire
task config is written into tasks.json, which introduces redundancy.
With this change, only properties that define the detected task, plus `problemMatcher`, are
written into tasks.json. (fixed #5679)

- `TaskConfigurations.taskCustomizations` is a flat array, and the user can only customize one type of detected task in one way.
With this change Theia supports having different ways of task customization in different root folders.

- The detected tasks, once customized, should be displayed as configured tasks in the quick open. (fixed #5747)

- The same task shouldn’t have more than one customization. Otherwise it would cause ambiguities and duplication in tasks.json (fixed #5719)

Signed-off-by: Liang Huang <[email protected]>
elaihau pushed a commit that referenced this issue Jul 27, 2019
- edit the right task.json when clicking "configure task" in multi-root
workspace (fixed #4919)

- in the current Theia, when users configure a detected task, the entire
task config is written into tasks.json, which introduces redundancy.
With this change, only properties that define the detected task, plus `problemMatcher`, are
written into tasks.json. (fixed #5679)

- allow users to override any task properties other than the ones used in the task definition.

- `TaskConfigurations.taskCustomizations` is a flat array, and the user can only customize one type of detected task in one way.
With this change Theia supports having different ways of task customization in different root folders.

- The detected tasks, once customized, should be displayed as configured tasks in the quick open. (fixed #5747)

- The same task shouldn’t have more than one customization. Otherwise it would cause ambiguities and duplication in tasks.json (fixed #5719)

Signed-off-by: Liang Huang <[email protected]>
elaihau pushed a commit that referenced this issue Jul 28, 2019
- edit the right task.json when clicking "configure task" in multi-root
workspace (fixed #4919)

- in the current Theia, when users configure a detected task, the entire
task config is written into tasks.json, which introduces redundancy.
With this change, only properties that define the detected task, plus `problemMatcher`, are
written into tasks.json. (fixed #5679)

- allow users to override any task properties other than the ones used in the task definition.

- `TaskConfigurations.taskCustomizations` is a flat array, and the user can only customize one type of detected task in one way.
With this change Theia supports having different ways of task customization in different root folders.

- The detected tasks, once customized, should be displayed as configured tasks in the quick open. (fixed #5747)

- The same task shouldn’t have more than one customization. Otherwise it would cause ambiguities and duplication in tasks.json (fixed #5719)

Signed-off-by: Liang Huang <[email protected]>
elaihau pushed a commit that referenced this issue Jul 28, 2019
- edit the right task.json when clicking "configure task" in multi-root
workspace (fixed #4919)

- in the current Theia, when users configure a detected task, the entire
task config is written into tasks.json, which introduces redundancy.
With this change, only properties that define the detected task, plus `problemMatcher`, are
written into tasks.json. (fixed #5679)

- allow users to override any task properties other than `type`, and those that are used to define the in its task definition.

- `TaskConfigurations.taskCustomizations` is a flat array, and the user can only customize one type of detected task in one way.
With this change Theia supports having different ways of task customization in different root folders.

- The detected tasks, once customized, should be displayed as configured tasks in the quick open. (fixed #5747)

- The same task shouldn’t have more than one customization. Otherwise it would cause ambiguities and duplication in tasks.json (fixed #5719)

Signed-off-by: Liang Huang <[email protected]>
elaihau pushed a commit that referenced this issue Aug 1, 2019
- edit the right task.json when clicking "configure task" in multi-root
workspace (fixed #4919)

- in the current Theia, when users configure a detected task, the entire
task config is written into tasks.json, which introduces redundancy.
With this change, only properties that define the detected task, plus `problemMatcher`, are
written into tasks.json. (fixed #5679)

- allow users to override any task properties other than `type`, and those that are used to define the in its task definition.

- `TaskConfigurations.taskCustomizations` is a flat array, and the user can only customize one type of detected task in one way.
With this change Theia supports having different ways of task customization in different root folders.

- The detected tasks, once customized, should be displayed as configured tasks in the quick open. (fixed #5747)

- The same task shouldn’t have more than one customization. Otherwise it would cause ambiguities and duplication in tasks.json (fixed #5719)

Signed-off-by: Liang Huang <[email protected]>
elaihau pushed a commit that referenced this issue Aug 1, 2019
- edit the right task.json when clicking "configure task" in multi-root
workspace (fixed #4919)

- in the current Theia, when users configure a detected task, the entire
task config is written into tasks.json, which introduces redundancy.
With this change, only properties that define the detected task, plus `problemMatcher`, are
written into tasks.json. (fixed #5679)

- allow users to override any task properties other than `type`, and those that are used to define the in its task definition.

- `TaskConfigurations.taskCustomizations` is a flat array, and the user can only customize one type of detected task in one way.
With this change Theia supports having different ways of task customization in different root folders.

- The detected tasks, once customized, should be displayed as configured tasks in the quick open. (fixed #5747)

- The same task shouldn’t have more than one customization. Otherwise it would cause ambiguities and duplication in tasks.json (fixed #5719)

Signed-off-by: Liang Huang <[email protected]>
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
2 participants