ARM-software / vscode-keil-studio-pack

Extension pack for all VS Code extensions
https://arm-software.github.io/vscode-keil-studio-pack/
Other
36 stars 6 forks source link

Provide manual commands to regenerate `CompileCommands` and `ClangdFile`? #26

Closed jmjoy closed 3 months ago

jmjoy commented 3 months ago

Type: Feature Request

I found that the Arm CMSIS Solution extension provides two options:

However, when significant project changes occur, clangd may fail, requiring a workspace restart to regenerate these files.

Is there a way to manually regenerate CompileCommands and ClangdFile?

jkrech commented 3 months ago

When you open the "output panel" and select "CMSIS Build Manager" you should see that it invokes: cbuild setup <solutionname>.csolution.yml --context-set ... whenever you e.g. edit and save the csolution.yml file this command is repeated. It will update the compile_commands.json file and copies it to the output artifacts folder. You can manually invoke the command from the terminal window inside VSCode to trigger an update manually. Does that help?

jmjoy commented 3 months ago

Thank you very much.

Would it be more user-friendly to provide a VSCode command to manually run cbuild setup?

jkrech commented 3 months ago

In my view, this should become part of cmsis-csolution.refresh which it currently does not seem to be.