Fix: Include additionalKits regardless of showSystemKits setting #4660
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change addresses item #2500
This changes visible behavior
The following changes are proposed:
additionalKitsin theavailableKitsgetter regardless ofshowSystemKitssettingThe purpose of this change
Kits from
cmake.additionalKits(including devcontainer customizations) were hidden whencmake.showSystemKitswasfalse.The
availableKitsgetter incorrectly excludedadditionalKitswhenshowSystemKitswas false:additionalKitsare explicitly user-specified kit files and should always be visible.showSystemKitsshould only gateuserKits(auto-discovered system kits).Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
0psvsblobprodwus2145.vsblob.vsassets.io/usr/local/bin/node node /usr/local/bin/npm install(dns block)2wrvsblobprodwus2180.vsblob.vsassets.io/usr/local/bin/node node /usr/local/bin/yarn install(dns block)40vvsblobprodwus2135.vsblob.vsassets.io/usr/local/bin/node node /usr/local/bin/yarn install(dns block)/usr/local/bin/node node /usr/local/bin/npm install(dns block)5bdvsblobprodwus2128.vsblob.vsassets.io/usr/local/bin/node node /usr/local/bin/npm install(dns block)7t8vsblobprodwus2168.vsblob.vsassets.io/usr/local/bin/node node /usr/local/bin/npm install(dns block)b15vsblobprodwus2164.vsblob.vsassets.io/usr/local/bin/node node /usr/local/bin/yarn install(dns block)b53vsblobprodwus2154.vsblob.vsassets.io/usr/local/bin/node node /usr/local/bin/yarn install(dns block)d94vsblobprodwus2119.vsblob.vsassets.io/usr/local/bin/node node /usr/local/bin/yarn install(dns block)ezcvsblobprodwus2170.vsblob.vsassets.io/usr/local/bin/node node /usr/local/bin/npm install(dns block)k4pvsblobprodwus2140.vsblob.vsassets.io/usr/local/bin/node node /usr/local/bin/yarn install(dns block)/usr/local/bin/node node /usr/local/bin/npm install(dns block)n6wvsblobprodwus2123.vsblob.vsassets.io/usr/local/bin/node node /usr/local/bin/yarn install(dns block)p2tvsblobprodwus2189.vsblob.vsassets.io/usr/local/bin/node node /usr/local/bin/yarn install(dns block)v41vsblobprodwus2175.vsblob.vsassets.io/usr/local/bin/node node /usr/local/bin/yarn install(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details on the original issue you should resolve
<issue_title>[Bug] CMake Tools extension does not honor most customization settings provided by devcontainer</issue_title>
<issue_description>### Brief Issue Summary
In general: many cmake tools settings seem to be sourced only from the local workspace
.vscode/settings.json, and cannot then be overridden in.devcontainer/devcontainer.jsonvia"customizations" { "vscode" { settings { } } }.Some other settings behave weirdly or inconsistently.
Here are the specific issues found so far (this is probably not exhaustive):
Devcontainer customization
cmake.additionalKits []array is honored if and only if the workspace.vscode/settings.jsonhas"cmake.showSystemKits": true. Set it tofalsein.vscode/settings.json, and it won't loadadditionalKits []from the devcontainer settings, regardless of whether the devcontainer settings overridesshowSystemKits : true.--> this seems like incorrect logic
Several settings in devcontainer customizations are simply never honored at all if also set in the workspace
.vscode/settings.json. Only the workspace settings are ever used.cmake.options.statusBarVisibilitycmake.options.advanced: { build/debug/launch/...etc: { statusBarVisibility/projectStatusVisibility } }cmake.enableAutomaticKitScan--> this is particularly a problem if you want to find kits only when in a container, and not in the host, for specialized cross-compiling setups
cmake.configureOnEdit--> this is really problematic in the same scenario as above. Either you forgo this setting everywhere, or you accidentally generate
__unspec__build targets when simply editing CMakeLists.txt files on the host...CMake Tools Diagnostics
{ "os": "linux", "vscodeVersion": "1.107.1", "cmtVersion": "1.21.36", "configurations": [ { "folder": "/usr/src/fmk", "cmakeVersion": "unknown", "configured": false, "generator": "unknown", "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
[proc] Executing command: /usr/bin/cmake --version [proc] with environment: {"CCACHE_DIR":"/usr/src/fmk/build/linux/ccache","HOSTNAME":"62293f4a0d74","HOME":"/home/ryan","CCACHE_MAXSIZE":"10G","PATH":"/vscode/vscode-server/bin/linux-x64/994fd12f8d3a5aa16f17d42c041e5809167e845a/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/ryan/.local/bin","DEBIAN_FRONTEND":"noninteractive","SHELL":"/bin/bash","PWD":"/vscode/vscode-server/bin/linux-x64/994fd12f8d3a5aa16f17d42c041e5809167e845a","TZ":"Etc/UTC","VSCODE_CWD":"/vscode/vscode-server/bin/linux-x64/994fd12f8d3a5aa16f17d42c041e5809167e845a","VSCODE_NLS_CONFIG":"{\"userLocale\":\"en\",\"osLocale\":\"en\",\"resolvedLanguage\":\"en\",\"defaultMessagesFile\":\"/vscode/vscode-server/bin/linux-x64/994fd12f8d3a5aa16f17d42c041e5809167e845a/out/nls.messages.json\",\"locale\":\"en\",\"availableLanguages\":{}}","VSCODE_HANDLES_SIGPIPE":"true","VSCODE_ESM_ENTRYPOINT":"vs/workbench/api/node/extensionHostProcess","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","REMOTE_CONTAINERS_IPC":"/tmp/vscode-remote-containers-ipc-b87c9d73-db0b-49de-8742-765a7f0c4c16.sock","LS_COLORS":"","LESSCLOSE":"/usr/bin/lesspipe %s %s","REMOTE_CONTAINERS_SOCKETS":"[\"/tmp/vscode-ssh-auth-b87c9d73-db0b-49de-8742-765a7f0c4c16.sock\",\"/tmp/.X11-unix/X0\",\"/home/ryan/.gnupg/S.gpg-agent\"]","LESSOPEN":"| /usr/bin/lesspipe %s","USER":"ryan","SHLVL":"1","PROMPT_DIRTRIM":"4","_":"/usr/bin/cat","SSH_AUTH_SOCK":"/tmp/vscode-ssh-auth-b87c9d73-db0b-49de-8742-765a7f0c4c16.sock","DISPLAY":":0","REMOTE_CONTAINERS_DISPLAY_SOCK":"/tmp/.X11-unix/X0","XDG_RUNTIME_DIR":"/tmp/user/1000","WAYLAND_DISPLAY":"vscode-wayland-e7bec200-0e4e-4c7d-9ad9-1cce991523b9.sock","REMOTE_CONTAINERS":"true","BROWSER":"/vscode/vscode-server/bin/linux-x64/994fd12f8d3a5aa16f17d42c041e5809167e845a/bin/helpers/browser.sh","VSCODE_RECONNECTION_GRACE_TIME":"10800000","ELECTRON_RUN_AS_NODE":"1","VSCODE_IPC_HOOK_CLI":"/tmp/user/1000/vscode-ipc-710f6b8b-19ee-457d-9513-623f6fd87f5b.sock","VSCODE_L10N_BUNDLE_LOCATION":""} [proc] Executing command: /usr/bin/cmake -E capabilities [proc] with environment: {"CCACHE_DIR":"/usr/src/fmk/build/linux/ccache","HOSTNAME":"62293f4a0d74","HOME":"/home/ryan","CCACHE_MAXSIZE":"10G","PATH":"/vscode/vscode-server/bin/linux-x64/994fd12f8d3a5aa16f17d42c041e5809167e845a/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/ryan/.local/bin","DEBIAN_FRONTEND":... </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes microsoft/vscode-cmake-tools#4651 <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.