Uh oh!
There was an error while loading. Please reload this page.
Add support for CodeChecker parse - #37
Conversation
bd09273 to
2d14270Compare| try { | ||
| // Structure: CodeChecker analyzer version: \n {"Base package version": "M.m.p", ...} | ||
| const outputLines = processOutput.split('\n'); | ||
| const dataLine = outputLines.findIndex((line) => line.search(/CodeChecker analyze version:/))+1; |
There was a problem hiding this comment.
CodeChecker version command is not a valid JSON format. I already create a patch to solve this problem (Ericsson/codechecker#3558).
By the way we are using only the analyzer part of the CodeChecker so we can get the analyzer version with the following command: CodeChecker analyzer-version
There was a problem hiding this comment.
Thanks for the analyzer-version! The version check now uses that one. Removed the rest of the trimming code.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| const minimum = [6, 18, 1]; | ||
| if (version < minimum) { | ||
| this._bridgeMessages.fire(`>>> Unsupported CodeChecker version ${version}\n`); |
There was a problem hiding this comment.
I had a 6.17.0 CodeChecker version in my PATH but I don't see any notification about this. The analysis was successfully finished but I don't see any reports in the CodeChecker Overview tab. So I checked the debug logs and I saw this message there. A tipical user will not find this information, so can we show a popup with this information in this case?
There was a problem hiding this comment.
Added notifications for both unsupported and missing cases.
Not sure what links to include there, but for now they're good enough.
Uh oh!
There was an error while loading. Please reload this page.
| return undefined; | ||
| } | ||
| public getAnalyzeCmdLine(...files: Uri[]): string | undefined { |
There was a problem hiding this comment.
Let's assume that I have two files a.cpp and b.cpp and I open these files (I don't modify any of them). If I open a.cpp the GUI says analysis in progress / finished. If I open b.cpp it will show the same message in the footer. If I select a.cpp again it will still show me the same.
From the logs I think we do not really run the analysis but the messages are missleading. So I recommend not to show these messages when we do not relly running the analysis.
There was a problem hiding this comment.
Fixed for now, so that parse / version doesn't update the bottom bar. Same condition as showing / hiding the progress bar.
| ].join(' '); | ||
| } | ||
| public getParseCmdLine(...files: Uri[]): string | undefined { |
There was a problem hiding this comment.
If I open a source file in the logs I will see the following messages:
>>> Starting process 'CodeChecker parse'> /CodeChecker/bin/CodeChecker parse /home/username/helloworld/.codechecker -e json --file "/extension-output-codechecker.codechecker-#1"
>>> Process 'CodeChecker parse' exited with code 0
>>> Starting process 'CodeChecker parse'> /CodeChecker/bin/CodeChecker parse /home/username/helloworld/.codechecker -e json --file "/extension-output-codechecker.codechecker-#1""/home/username/helloworld/multiple/a.cpp"
>>> Process 'CodeChecker parse' exited with code 0Are we running the parse command multiple times? Also why are these differents?
There was a problem hiding this comment.
We run the parse command on all 'visible text editors changed' events (opens, tab switches, etc.):
I'm not sure how it handles opening new windows, since it's a VS Code builtin, but it hasn't changed from before.
Will need to investigate further about whether this is an issue or not, but I don't believe a fix will make it into this PR.
There was a problem hiding this comment.
Okay, I created a separate issue for this problem: #39.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
2d14270 to
b356b33CompareDiscookie
commented
Dec 22, 2021
Added notifications for missing and outdated CodeChecker installs. Fixes #29 as well. |
csordasmarton
left a comment
There was a problem hiding this comment.
I have just some tiny comments otherwise LGTM!
| ].join(' '); | ||
| } | ||
| public getParseCmdLine(...files: Uri[]): string | undefined { |
There was a problem hiding this comment.
Okay, I created a separate issue for this problem: #39.
| `CodeChecker: Version ${minimum.join('.')} not supported. ` + | ||
| 'Update CodeChecker, or check the extension settings.', | ||
| 'Open releases', | ||
| 'Installation guide', |
There was a problem hiding this comment.
The message is not correct, because you say that the minimum supported version is not supported. I recommend to refactor this message to something like this:
| `CodeChecker: Version ${minimum.join('.')} not supported. `+ | |
| 'Update CodeChecker, or check the extension settings.', | |
| 'Open releases', | |
| 'Installation guide', | |
| `CodeChecker version you are using (${version.join('.')}) is not supported. `+ | |
| `The minimum supported version is ${minimum.join('.')}. Please update to the `+ | |
| `latest CodeChecker version, or check the extension settings.`, | |
| 'Open releases', | |
| 'Installation guide', | |
| 'Settings', |
And also add an extra button to open the Settings of this extension.
There was a problem hiding this comment.
Fixed as requested, and added the Open settings button to the "Not found" notif as well.
Uh oh!
There was an error while loading. Please reload this page.
b356b33 to
4f3ca8aCompare
Adds support for the
CodeChecker parsecommand, new with CC version6.18.0.Fixes#31, fixes#20, fixes#29.
Refactored the executor infrastructure, which allows for running and prioritizing multiple processes.
Currently the process priorities are
version > parse > analyze > anything else.A queue system is in place to be able to queue, clear and replace multiple types of tasks at the same time.
Refactored Diagnostics to use the new format provided by CodeChecker parse.
This means losing some information, such as the depth of the repr. steps stack. Replacement for that will be in another PR.
Otherwise, the feature-set is on par with the old Diagnostic system.
Added a minimum CodeChecker version check for all executions, without a user alert for now.
Currently the minimum version is
6.18.1, for the--fileflag ofCodeChecker parse.A user alert on an old CC will be added soon to this PR.
The new Executor infrastructure could really use some tests, but for now it is untested. Expect tests to land in another PR.