-
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
prompt user to choose parser to parse task output #5877
Conversation
9d86a05
to
5e35d9a
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.
@elaihau
Hello!
I tested your changes using npm extension and faced with the following case:
- Run
npm:build
task -> drop down menu -> selecteslint
item - The configuration is moved to
tasks.json
file andproblemMatcher
is defined - The parser is assigned to the task, so
as a user I should not see the list show up
at next running
It works well. - What user need to do to get again drop down menu and select another item?
I deleted problemMatcher
field for the task in tasks.json
file and run again the same task - > got drop down menu -> selected another item
As result, I got two configurations with the same label in tasks.json
file and in Terminal -> Run Task menu.
Please see the video: https://youtu.be/zpoZ0F0lXok
Can the behavior be improved?
Like here for example: https://youtu.be/SgBuu1-1X5g
WDYT?
thank you!
@RomanNikitenko thank you for testing, really appreciated ! Yes it is definitely a bug. What I did to "get the drop down menu and select another item" is removing the entire cutomization object from Fixing it is more difficult than I thought, as we don't have the info of where a taskDefinition comes from. Worse case i might need to change some interfaces. I will see what is the lowest-impact solution to fix it. |
I noticed that |
For the information of reviews of this pull reuqest: #5915 is created to fix the issue where task definitions are not loaded before the initialization of tasks. It is a blocker of testing and merging this pull request. |
5e35d9a
to
71bee03
Compare
@vince-fugnitto @RomanNikitenko @azatsarynnyy |
eb39df7
to
7c19815
Compare
- before a task runs, prompt the user to choose which parser to use to parse the task output, and write user's choice into `tasks.json` - part of #4212 Signed-off-by: Liang Huang <liang.huang@ericsson.com>
7c19815
to
a866f32
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.
It looks really good, nice work @elaihau !
I tested the following:
Observation | Status |
---|---|
ProblemMatchers are sorted alphabetically | 👍 |
When prompted, choosing continue... will not write to the tasks.json |
👍 |
When prompted, choosing never... will write [] to skip parsing |
👍 |
When prompted, choosing a parser will write the parser successfully |
👍 |
Writing the parser works correct in any location in the tasks.json |
👍 |
Writing the parser works correctly event with a trailing comma | 👍 |
Manually removing a ProblemMatcher successfully resets and the user must be prompted again if he re-runs the task | 👍 |
If an appropriate ProblemMatcher is chosen for a given task, the markers are reflected in the problems-view |
👍 |
If a ProblemMatcher exists for a given task, no prompt is displayed and the ProblemMatcher is used successfully | 👍 |
Run Last Task still works correctly, the task is re-run with its defined ProblemMatcher if available |
👍 |
The code also looks fine to me, I don't have any objections :)
Thank you Vincent ! Your review covered so many things I didn't try out. |
I opened a follow-up issue to enhance the functionality by supporting adding the |
tasks.json
. Please note: tasks that are already assign problem matchersHow to test
Have a detected task prepared. A configured task with no defined problem matcher also works. If a detected task is involved in the testing, make sure it is successfully loaded as Theia currently has a bug where the detected tasks are not loaded in time some plugins are not loaded in time #5861 (comment)
Run the prepared task, as a user I should see a list of options that advise me what to use to parse the task output.
tasks.json
as one property of the task.Review checklist