-
Notifications
You must be signed in to change notification settings - Fork 303
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
[VSC-1409] Add check for missing compile_commands.json in IDF projects #1271
base: master
Are you sure you want to change the base?
[VSC-1409] Add check for missing compile_commands.json in IDF projects #1271
Conversation
Download the artifacts for this pull request: |
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.
Few changes I consider would improve this PR
Hi @brianignacio5, thank you for the review! |
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.
LGTM
Hi @AndriiFilippov, PTAL |
Pull request has been marked as |
Hi @Fabricio-ESP, PTAL |
Pull request has been marked as |
5de3252
to
f96d071
Compare
The extension is properly detecting the missing file in the builds folder and running the reconfigure command. Tested on Windows and Linux. Side effect is that when opening a new project (from a example) the build folder does not exist yet, and the error notification will be triggered. Running the reconfigure command will generate the build for the ESP32 default target. If the user wants to change the target the build folder will need to recreated. If the user has set multiple configuration profiles and the build folder have other names than "build" the extension is showing the error that the compile_commands.json is missing, but they are properly saved on each build folder, so there is something there to detect the file on this scenario. |
a85d68b
to
c8a4e82
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.
LGTM
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.
Tested on Windows, WSL and Linux.
Reconfigure command working as expected.
- Removed helper function from logger/utils - Moved code in already existing event listener - Wrapped event listener with context.subscriptions.push() - Localized messages displayed to user
We don't need to use "=" in the commands anymore
bf43756
to
0fa8e6c
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.
Rebase issues.
@@ -129,12 +127,6 @@ export class BuildTask { | |||
"-DPYTHON_DEPS_CHECKED=1", | |||
"-DESP_PLATFORM=1", | |||
]; | |||
} else if (useEqualSign) { |
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 rebase is removing changes from #1266 which are implemented in master.
Please update.
reconfigureArgs.push(`-B=${this.buildDirPath}`); | ||
} else { | ||
reconfigureArgs.push("-B", this.buildDirPath); | ||
reconfigureArgs.splice(buildPathArgsIndex, 2); |
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.
Same here removing changes in master from #1266
@@ -391,77 +392,81 @@ export async function activate(context: vscode.ExtensionContext) { | |||
binTimestampEventFunc | |||
); | |||
context.subscriptions.push(buildWatcherCreateDisposable); | |||
|
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.
Changes from 394 to 469 are not related to the PR proposal solution. While I think is good to add this to context subscription
disposable array, the amount of changes are not necessary.
Please update to remove these changes.
Description
This pull request adds a new feature to improve the user experience when working with ESP-IDF projects in VS Code, particularly when using the Microsoft C/C++ extension.
Key changes:
compile_commands.json
file when opening an ESP-IDF project.For users using the Microsoft's C/C++
compile_commands.json
file is crucial for proper IntelliSense functionality in ESP-IDF projects.JIRA https://jira.espressif.com:8443/browse/VSC-1409
Type of change
Steps to test this pull request
compile_commands.json
file in itsbuild
directory.espIdf.idfReconfigureTask
command that generates thecompile_command.json
file inbuild
folder of the project.How has this been tested?
As described above
Test Configuration:
Checklist