Open michaelbjerking opened 1 week ago
I cleaned up my user setting's to no longer see "[driver] NOTE: You are configuring with preset unittest-gcc9,"
The user setting has the following cmake option: "cmake.configureOnOpen": true, "cmake.options.statusBarVisibility": "visible", "cmake.loggingLevel": "debug",
I can select presets in status bar, but get e.g below log, and then that preset disappears from statusbar selection: [preset] Preset unittest-gcc9 in CMakePresets.json can't inherit from preset unittest in CMakeUserPresets.json
@michaelbjerking In the presets and UserPresets that you linked, there are no presets in UserPresets, they are only in presets. I wasn't able to repro with the files you dropped, is it possible those files need to be updated to match the problem you're describing?
The error can be reproduce with latest VsCode 1.93 (we only got the problem after latest update) and the inheritance problem occurred just by having the "empty" CMakeUserPresets file (version only).
@michaelbjerking Interesting, in that case, I wasn't able to reproduce the problem, it seemed to work as expected for me. @v-frankwang Could you also help us try to reproduce?
Just reproduced bug in WSL workspace with only the above 3 file, using VsCode 1.93.1.
> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
Two extension: twxs.cmake ms-vscode.cmake-tools
Local setting in "%AppData%/Roaming/Code/User/settings:"
{
"workbench.colorTheme": "Default Dark Modern",
"security.allowedUNCHosts": [
"wsl.localhost",
"NAS2022"
],
"window.zoomLevel": 2,
"diffEditor.ignoreTrimWhitespace": false,
"cmake.configureOnOpen": true,
"cmake.options.statusBarVisibility": "visible",
"cmake.loggingLevel": "debug"
}
@michaelbjerking What is the impact of the possible bug? Does it block you from using certain features? Or is it just an output message?
Each build entry you select (which then post the error), is then deleted from the dropdown list, and you can't select it again.
@michaelbjerking Interesting, I'm not seeing the error output, and I actually don't see that string anywhere in the codebase, but I am seeing the behavior of it not showing up in the dropdown list after selecting, so I'll investigate. THanks!
@michaelbjerking To clarify for our investigation. You are able to successfully use the configuration or build preset upon initial selection of the preset, but then, if you try to change it and then come back to that same preset, you have to either restart VS Code, resave your presets file, etc, in order to do that?
Yes, I didn't find a way to get "preset droplist" back, so would have to restart VS Code.
@michaelbjerking I've just confirmed that you can workaround this in a much easier way simply by re-saving either your CMakePresets.json or your CMakeUserPresets.json.
@michaelbjerking I have a PR open here: #4081, please feel free to take a look and even download the vsix from the description to help test. You'll have to download the .zip and then change the file extension to .vsix in order to install and test.
Brief Issue Summary
When trying to select a preset in UI the below error is printed i "output"
[preset] Preset unittest-gcc9 in CMakePresets.json can't inherit from preset unittest in CMakeUserPresets.json [preset] Preset unittest-clang in CMakePresets.json can't inherit from preset unittest in CMakeUserPresets.json
CMake Tools Diagnostics
Debug Log
Additional Information
CMakeLists.txt CMakePresets.json CMakeUserPresets.json