-
Notifications
You must be signed in to change notification settings - Fork 454
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
CMakePresets.json can't inherit from preset in CMakeUserPresets.json #4059
Comments
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: I can select presets in status bar, but get e.g below log, and then that preset disappears from statusbar selection: |
@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.
Two extension: Local setting in "%AppData%/Roaming/Code/User/settings:"
|
@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. |
Tested cmake-tools.vsix and the dropdown list works, and I don't get any [preset] errors in output. |
I might be hitting this as well. How do I tell if I have an affected version? (sorry if this is obvious; I'm very new to VS Code world.)
|
@G-Harmon You'll need to wait until this PR: is merged to be unaffected on this PR : #4081 merged version and on subsequent versions, and currently the only time you don't run into this problem is when installing the CMake Tools extension through the vsix mentioned in comment: #4059 (comment) above. |
I had the same problem, #4081 fixed it for me as well. |
@danfabo Thanks so much for your comment, and glad your issue was resolved! |
Had the same issue and #4081 solved it. |
@sejapou Thanks so much for your comment, and glad your issue was resolved! |
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
The text was updated successfully, but these errors were encountered: