-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Contribute problem matcher #24114
Contribute problem matcher #24114
Conversation
There seems to be some sort of caching problem happening. Very first time the task is ran with problem matcher, the appropriate error message are shown in problem tab, however if that same terminal window is reused for second round of task with the same problem matcher, it messes up (show the capturing of different string and not the appropriate error) in the problems tab. Screen.Recording.2024-09-16.at.1.26.42.PM.mov |
With f2251b8 Problem matcher shows the correct problems in the problems tab, but ONLY for the very first task instance. After the first run of the task and if user decides to REUSE the task terminal, I think the problem matcher or task is getting confused and doesn't show any problems: Screen.Recording.2024-09-16.at.1.40.07.PM.movThis issue is filed here in vscode repo: microsoft/vscode#228883 |
package.json
Outdated
"problemMatchers": | ||
[ | ||
{ | ||
"name": "pythonCustomMatcher", |
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.
This should be something shorter. @cwebster-99 This name will be used in tasks.json for problem matching with python tasks. Can you suggest one for python?. I was thinking going with python
.
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.
python
SGTM!
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 don't see the severity and message group.
package.json
Outdated
"severity": 4, | ||
"message": 5 |
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.
The above regex seems to only have 2 groups. This will not extract message/severity as far as I understand.
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 got rid of message (this shouldnt have any effect because message defaults to 5), and got rid of severity entirely too and that doesnt seem to do anything too. 472103b
"message": 5 | ||
}, | ||
{ | ||
"regexp": "^\\s*(.*)\\s*$" |
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.
This expression seems to capture all lines. What is the purpose of this?
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.
The problem matcher will not pick up intended errors(NameError, ValueError, etc) if this is removed.
Generally it seems that array that is set for "pattern" is responsible for multi-line string of output that we(problem matcher) intends to parse.
For our case specifically, it will be responsible for capturing the output right above (error ---> the error is the one we intend to show in the problem panel); So this would allow us to correctly capture and show the error in the problems panel, and not the output above the error.
Co-authored-by: Karthik Nadig <[email protected]>
Resolves: #3828
Breaking #23953 down into two PR