microsoft / microsoft/vscode-cmake-tools

[Flaky]Duplicate information appeared in output when Add CMakePreset.json

Open
#3,873 0 comments 0 reactions 1 assignee Claimed by @qarni View on GitHub
bug Feature: presets
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### Brief Issue Summary

**Environment**:
VSCode 1.90.1+ CMake Tools v1.19.13(pre-release)

**More info**:
- Repro Language: ENU and loc languages
- This is a flaky issue: repro rate 30%

**Repro steps**:
1. Open VScode
2. Create a new folder named 'Test' and open it with vscode.
3. Create a file named CMakeLists.txt under test with the following content:
```
cmake_minimum_required (VERSION 3.8)
project ("test")
add_executable (test "test.cpp" )
```
4. Create a file named test.cpp under test with the following content:
```
#include
int main(int argc, char **argv)
{
std::cout << "Hello World" << std::endl;
return 0;
}
```
5. Create "CMakePresets.json" file and copy the following code into the file, then save it
```
{
"version": 3,
"configurePresets": [
{
"name": "windows-base",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}",
"cacheVariables": {
"CMAKE_C_COMPILER": "cl.exe",
"CMAKE_CXX_COMPILER": "cl.exe"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
}
]
}
```
6. Launch output window and navigate to "CMake/Build" category
7. Check the output info

**Expected result**:
Without duplicate output info

**Actual result**:
Duplicate output info appeared
![Dup_output](https://github.com/microsoft/vscode-cmake-tools/assets/37648162/8caf50f3-a883-42e7-abda-0f8d14fae958)

Whole process:
![CMakeTools_DupOutput](https://github.com/microsoft/vscode-cmake-tools/assets/37648162/e3b25ed1-ad71-4d13-b2d6-a620610455fc)

### CMake Tools Diagnostics

_No response_

### Debug Log

_No response_

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.