vscode-cmake-tools
vscode-cmake-tools copied to clipboard
Scan-for-kits duplicates entries for updated kits
Brief Issue Summary
When a compiler/kit is updated and running "Scan for kits", CMake tools will show both the old and new version of the kit.
Here is an example showing duplicates for MSVC and for MingW
CMake Tools Diagnostics
{
"os": "win32",
"vscodeVersion": "1.67.2",
"cmtVersion": "1.10.5",
"configurations": [
{
"folder": "<removed>,
"cmakeVersion": "3.23.1",
"configured": false,
"generator": "Ninja Multi-Config",
"usesPresets": false,
"compilers": {}
}
],
"cpptoolsIntegration": {
"isReady": false,
"hasCodeModel": false,
"activeBuildType": "",
"buildTypesSeen": [],
"requests": [],
"responses": [],
"partialMatches": [],
"targetCount": 0,
"executablesCount": 0,
"librariesCount": 0,
"targets": []
},
"settings": [
{
"communicationMode": "automatic",
"useCMakePresets": "auto",
"configureOnOpen": true
}
]
}
Debug Log
No response
Additional Information
No response
Thank you for the feature suggestion. We may not get to this immediately, but would accept a PR from the community if someone can get to this before us.
Sometimes CMake tools asks to remove missing kits. It's not quite clear when this happens. Is there an action to "Clean up" the kits? If no maybe adding such an action could be part of the solution?
We ask to remove missing kits when we detect that the compiler binaries no longer exist.
We don't currently have an action to clean up the Kits. The workaround is to run the 'Edit User-local CMake Kits" command, replace the file contents with []
and then scan for kits again. This issue is asking for us to detect the duplicates when scanning for updates and do the clean up at that point in time instead of adding a new command for it.