Skip to content

[Bug][Regression] Project cannot stop build after setting "cmake.buildTask" as true #4465

@Amy-Li03

Description

@Amy-Li03

Brief Issue Summary

Environment:

VS Code 1.100.2+ CMake Tools v1.21.27 (pre-release)

More info:

  1. Repro on Windows, Linux, Mac
  2. It starts repro from v1.21.5 to latest v1.21.27, so this is a regression issue
  3. This issue doesn't repro when disable cmake.buildTask

Repro steps:

  1. Create a folder and open it with VS Code
  2. Open workspace settings.json, and set
    "cmake.buildTask": true
  3. Create project using command "CMake: Quick Start"
  4. Reopen project
  5. Open the command palette(F1 or Ctrl+Shift+P)
  6. Enter and select the command "Tasks: Configure Task"
  7. Choose "CMake: build"
  8. Select the Build button from the Status bar and select a build task

test_project.zip

Expected Result:

Project should build successfully
Image

Actual Result:

Project cannot stop build
Image

CMake Tools Diagnostics

{
  "os": "win32",
  "vscodeVersion": "1.100.2",
  "cmtVersion": "1.21.27",
  "configurations": [
    {
      "folder": "c:\\Users\\v-amyli3\\Desktop\\Cmake_tools_Monthly\\test_project",
      "cmakeVersion": "3.31.5",
      "configured": true,
      "generator": "Ninja",
      "usesPresets": true,
      "compilers": {
        "C": "C:/msys64/ucrt64/bin/cc.exe",
        "CXX": "C:/msys64/ucrt64/bin/c++.exe"
      }
    }
  ],
  "cpptoolsIntegration": {
    "isReady": true,
    "hasCodeModel": true,
    "activeBuildType": "Debug",
    "buildTypesSeen": [
      "Debug"
    ],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 1,
    "executablesCount": 1,
    "librariesCount": 0,
    "targets": [
      {
        "name": "Helloworld",
        "type": "EXECUTABLE"
      }
    ]
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    }
  ]
}

Debug Log

[main] Building folder: C:/Users/v-amyli3/Desktop/Cmake_tools_Monthly/test_project/out/build/MyPresets 
[main] Saving open files before configure/build
[build] Starting build
[driver] Start build 
[proc] Executing command: chcp

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    buga bug in the productregressionused to work and no longer does. Regressions are typically high priority

    Type

    No type

    Projects

    Status

    Completed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions