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

Ability to add task subschema #6566

Merged
merged 1 commit into from
Nov 19, 2019
Merged

Ability to add task subschema #6566

merged 1 commit into from
Nov 19, 2019

Conversation

RomanNikitenko
Copy link
Contributor

@RomanNikitenko RomanNikitenko commented Nov 17, 2019

What it does

At the moment default schema and schemes of customized detected tasks are registered, so only these tasks are available for running.

The PR provides ability to add task subschema from an extension for a custom task type to get ability run it from Terminal => Run Task menu.

How to test

Please use my forked repo for testing, it contains:

  • the current PR changes
  • the test extension which allows to add/remove schemes for custom types
  • tasks with custom type for testing
  1. git clone https://github.com/RomanNikitenko/theia.git
  2. cd theia/ and git checkout task-extension.
  3. Build the project and run it.
  4. The project contains prepared tasks in tasks.json file, so please open the cloned project: File=>Open... and select the project.
  5. Go to Terminal => Run Task menu:
    you can see that only SHELL task is available for running
  6. Go to Help menu and select Add CHE task schema
    you can see that now CHE task is available for running as well as SHELL task.
  7. Try the same for EXEC task
  8. You can try to remove subschema for CHE task and EXEC task using Help menu
    you can see that the corresponding tasks are not available for running after that.

Please see https://youtu.be/VOuFi9M2Q2k

Review checklist

Reminder for reviewers

Signed-off-by: Roman Nikitenko [email protected]

@RomanNikitenko RomanNikitenko added the tasks issues related to the task system label Nov 17, 2019
@RomanNikitenko RomanNikitenko force-pushed the task-subschema branch 2 times, most recently from 31efcf1 to 8c0e00c Compare November 18, 2019 07:26
Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

@elaihau please finish the review

packages/task/src/browser/task-schema-updater.ts Outdated Show resolved Hide resolved
Signed-off-by: Roman Nikitenko <[email protected]>
Copy link
Contributor

@elaihau elaihau left a comment

Choose a reason for hiding this comment

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

I tested with Roman's extension, and confirm both "add schema" and "remove schema" work.

@RomanNikitenko
Copy link
Contributor Author

@akosyakov
could you review - is it OK from your point of view?
thank you!

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

code-wise looks good, thank you!

@RomanNikitenko RomanNikitenko merged commit 5c02a25 into master Nov 19, 2019
@RomanNikitenko RomanNikitenko deleted the task-subschema branch November 19, 2019 11:26
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.

3 participants