-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
notify clients of TaskDefinitionRegistry on change #5915
Conversation
packages/plugin-ext/src/main/browser/plugin-contribution-handler.ts
Outdated
Show resolved
Hide resolved
27fd75b
to
99a31e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Design-wise it looks good, someone has to verify the behaviour. cc @theia-ide/task-extension
99a31e4
to
a520f99
Compare
@vince-fugnitto @marechal-p this change is ready for review and test. could you please take a look when you get the chance? THank you ! |
I noticed something a little odd while testing, when executing the command Perhaps I am doing something wrong, I didn't quite understand how to properly test the PR. |
Hmmm, let me try the same. Probably there is a bug here. Thank you Vincent. |
a520f99
to
fbcee76
Compare
@vince-fugnitto you tested it in the right way :) |
@elaihau do you mind sharing your example project in which you had the |
@vince-fugnitto yes https://send.firefox.com/download/f6550506fa184dea/#53ypwivg9tNAKUVfa6DHiA the link is good for 5 downloads today |
Thank you! I'll test it shortly :) |
fbcee76
to
8f4f519
Compare
- In current theia, task definitions from plugins are registered after the initialization of the task extension, causing task-loading, which counts on the existence of task definitions, not to function correctly. With changes in this pull request, events are emitted so that the clients of TaskDefinitionRegistry are notified and therefore have the flexibility to re-organize the loaded tasks. Signed-off-by: Liang Huang <[email protected]>
8f4f519
to
f1ce203
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested using the example workspace you provided.
In my tasks.json
I have the following task with the $eslint-stylish
problemMatcher:
{
"tasks": [
{
"type": "npm",
"script": "lintAAA",
"problemMatcher": [
"$eslint-stylish"
]
}
]
}
After running the task I can see the markers being populated in the problems-view:
Thank you Vincent! |
Signed-off-by: Liang Huang [email protected]
How to test
npm
extension installed in Theia, and adding at least onenpm
script, so that the project has a few detected npm tasks. Reload Theia frontend (example-browser).tasks.json
, e.g.,What happened: the problem matcher, although defined in
tasks.json
, does not parse the task output, and therefore warnings and errors of the task did not show up in the problems viewWhat should happen: warnings and errors of the task, if any, should be displayed as markers in the problems view
Review checklist