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 removing all data from tasks.json #6033

Merged
merged 1 commit into from
Aug 26, 2019
Merged

Conversation

elaihau
Copy link
Contributor

@elaihau elaihau commented Aug 25, 2019

Signed-off-by: Liang Huang liang.huang@ericsson.com

How to test

  • Open a workspace that has: at least one detected task, and a tasks.json where at least one detected task is customized
  • Open the "Run task"
    • Expected: The customized detected tasks should be displayed as "Configured tasks".
  • Remove all data from tasks.json. Save changes.
  • Open the "Run task" again
    • Expected: all detected tasks should be displayed as "detected tasks", as the customizations have been removed from tasks.json

Review checklist

- When all data are removed from tasks.json, or data in tasks.json is
corrupted, Theia fails to update tasks that have been loaded into the
memory. This pull request fixes this bug.
- fixes #6032

Signed-off-by: Liang Huang <liang.huang@ericsson.com>
@akosyakov akosyakov requested a review from a team August 25, 2019 09:34
@akosyakov akosyakov added the tasks issues related to the task system label Aug 25, 2019
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works for me :)

I tested the following:

  1. open a workspace with the vscode npm built-in extension present
  2. configure a task (ex: npm prepare)
  3. execute run task (npm prepare is displayed as a configured task)
  4. remove the content from the tasks.json
  5. execute run task again (npm prepare is reset and now displayed as a detected task)

When testing on master, step 5 would still display the task as configured.
The bug is therefore fixed 👍

@elaihau
Copy link
Contributor Author

elaihau commented Aug 26, 2019

Thank you Vincent !

@elaihau elaihau merged commit 33cd496 into master Aug 26, 2019
@elaihau elaihau deleted the Liang/empty_task_json branch August 26, 2019 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tasks issues related to the task system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

emtpy tasks.json are not handled properly
3 participants