Closed Raffaello closed 3 weeks ago
Thank you for reporting issue here. I believe it is a duplicate of https://github.com/microsoft/vscode-cmake-tools/issues/2570. If you can go add a 👍 reaction to that issue, that helps us rank issues by priority. If there is something else to this issue that that one does not cover, please let us know.
Brief Issue Summary
for e.g. installing GCC 13.2 with mingw
using it with VS code (running scan for kits)
then upgrading to GCC 14.2
running again scan for kits.
the result is there are 2 kits pointing at the same path. The latter is correct.
So the error is scan for kits function doesn't update/replace (or simply remove older entries) when a new kit is discovered that has the same path of something that is already present in the list (or in the
cmake-tools-kits.json
file).detailed e.g. with
cmake-tools-kits.json
as you can see it is obliviously an error having the same
compilers
PATH but 2 different kits"GCC 13.2.0 x86_64-w64-mingw32 (ucrt64)" ===>"compilers": { "C": "C:\msys64\ucrt64\bin\gcc.exe", "CXX": "C:\msys64\ucrt64\bin\g++.exe" }
"GCC 14.2.0 x86_64-w64-mingw32 (ucrt64)" ===> "compilers": { "C": "C:\msys64\ucrt64\bin\gcc.exe", "CXX": "C:\msys64\ucrt64\bin\g++.exe" }
NOTE: in this specific case even the
PATH
is the same.CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
this is an error on the internal data design, it should something unique, like the full path of the compiler exe. Understand it might be tricky when there are multiple compilers, but for sure when all the compilers are matching another kit, it can be considered a duplicate, like the example above.
Furthermore it could even do a 2nd level comparison on the
enviromentalVariable
if also those 2 are the same.. ... well the only thing change most likely is only the name.in this specific e.g. should have just update the kit's name as the final result.