microsoft / microsoft/vscode-cmake-tools
[Bug] Changes in file included from CMakeUserPreset.json didn't applied until VS Code restart
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
### Brief Issue Summary
In our project we're using conan for managing thirdpartys. When I run the `conan install` command it will generate the following `CMakeUserPreset.json` file in the root directory:
```
{
"version": 4,
"vendor": {
"conan": {}
},
"include": [
"build/generated/CMakePresets.json"
]
}
```
Current behavior:
Project settings were generated in the included `build/generated/CMakePresets.json` If VS Code is open when the generated `build/generated/CMakePresets.json` file is changed it won't affect the CMake variables and settings used for configuration. Even if I use the `Delete Cache / Reconfigure` the CMake plugin will use the old "cached" settings. The only solution to make it work is to close and reopen VS Code.
Expected behavior:
The changes in the `build/generated/CMakePresets.json` is detected and a new configuration step is triggered with the new settings.
### CMake Tools Diagnostics
```shell
{
"os": "win32",
"vscodeVersion": "1.109.5",
"cmtVersion": "1.22.28",
"configurations": [
{
"folder": "c:\\work\\git\\temp_project.git",
"cmakeVersion": "3.31.2",
"configured": true,
"generator": "Visual Studio 17 2022",
"usesPresets": true,
"compilers": {}
}
],
"cpptoolsIntegration": {
"isReady": true,
"hasCodeModel": true,
"activeBuildType": "Debug",
"buildTypesSeen": [
"Debug",
"Release",
"MinSizeRel",
"RelWithDebInfo"
],
"requests": [],
"responses": [],
"partialMatches": [],
"targetCount": 44,
"executablesCount": 2,
"librariesCount": 19,
"targets": []
},
"settings": [
{
"communicationMode": "automatic",
"useCMakePresets": "auto",
"configureOnOpen": true
}
]
}
```
### Debug Log
```shell
Can't share the debug output
```
### Additional Information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.