Skip to content

[Bug] Clicking test button with an unsaved CMakeLists.txt fails due to automatic configure on save. #4794

@rmerrill-fw

Description

@rmerrill-fw

Brief Issue Summary

If you click the "test" button while a CMakeLists.txt is unsaved, it will first save the CMakeLists.txt, but this automatically triggers a reconfigure which then conflicts with the test, causing an error "Configuration is already in progress". Clicking the test button again then works properly.

CMake Tools Diagnostics

{
  "os": "linux",
  "vscodeVersion": "1.109.0",
  "cmtVersion": "1.22.28",
  "configurations": [
    {
      "folder": "/workspace",
      "cmakeVersion": "3.28.3",
      "configured": true,
      "generator": "Ninja",
      "usesPresets": false,
      "compilers": {
        "C": "/var/yocto-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc",
        "CXX": "/var/yocto-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++"
      }
    }
  ],
  "cpptoolsIntegration": {
    "isReady": true,
    "hasCodeModel": true,
    "activeBuildType": "Debug",
    "buildTypesSeen": [
      "Debug"
    ],
    "requests": [
      "file:///workspace/system/monitor/src/monitor_unit.cpp",
      "file:///workspace/system/monitor/src/monitor_controller.cpp"
    ],
    "responses": [
      {
        "uri": "file:///workspace/system/monitor/src/monitor_unit.cpp",
        "configuration": {
          "includePath": [
            "/workspace/system/monitor/include",
            "/root/build/great-lakes/_deps/boost-src/libs/mp11/include",
            "/workspace/common/asio/include",
            "/root/build/great-lakes/_deps/boost-src/libs/asio/include",
            "/root/build/great-lakes/_deps/boost-src/libs/align/include",
            "/root/build/great-lakes/_deps/boost-src/libs/assert/include",
            "/root/build/great-lakes/_deps/boost-src/libs/config/include",
            "/root/build/great-lakes/_deps/boost-src/libs/core/include",
            "/root/build/great-lakes/_deps/boost-src/libs/static_assert/include",
            "/root/build/great-lakes/_deps/boost-src/libs/throw_exception/include",
            "/root/build/great-lakes/_deps/boost-src/libs/system/include",
            "/root/build/great-lakes/_deps/boost-src/libs/variant2/include",
            "/root/build/great-lakes/_deps/boost-src/libs/winapi/include",
            "/root/build/great-lakes/_deps/boost-src/libs/predef/include",
            "/root/build/great-lakes/_deps/boost-src/libs/date_time/include",
            "/root/build/great-lakes/_deps/boost-src/libs/algorithm/include",
            "/root/build/great-lakes/_deps/boost-src/libs/array/include",
            "/root/build/great-lakes/_deps/boost-src/libs/bind/include",
            "/root/build/great-lakes/_deps/boost-src/libs/concept_check/include",
            "/root/build/great-lakes/_deps/boost-src/libs/preprocessor/include",
            "/root/build/great-lakes/_deps/boost-src/libs/type_traits/include",
            "/root/build/great-lakes/_deps/boost-src/libs/exception/include",
            "/root/build/great-lakes/_deps/boost-src/libs/smart_ptr/include",
            "/root/build/great-lakes/_deps/boost-src/libs/tuple/include",
            "/root/build/great-lakes/_deps/boost-src/libs/function/include",
            "/root/build/great-lakes/_deps/boost-src/libs/iterator/include",
            "/root/build/great-lakes/_deps/boost-src/libs/detail/include",
            "/root/build/great-lakes/_deps/boost-src/libs/fusion/include",
            "/root/build/great-lakes/_deps/boost-src/libs/container_hash/include",
            "/root/build/great-lakes/_deps/boost-src/libs/describe/include",
            "/root/build/great-lakes/_deps/boost-src/libs/function_types/include",
            "/root/build/great-lakes/_deps/boost-src/libs/mpl/include",
            "/root/build/great-lakes/_deps/boost-src/libs/utility/include",
            "/root/build/great-lakes/_deps/boost-src/libs/io/include",
            "/root/build/great-lakes/_deps/boost-src/libs/typeof/include",
            "/root/build/great-lakes/_deps/boost-src/libs/functional/include",
            "/root/build/great-lakes/_deps/boost-src/libs/optional/include",
            "/root/build/great-lakes/_deps/boost-src/libs/range/include",
            "/root/build/great-lakes/_deps/boost-src/libs/conversion/include",
            "/root/build/great-lakes/_deps/boost-src/libs/regex/include",
            "/root/build/great-lakes/_deps/boost-src/libs/unordered/include",
            "/root/build/great-lakes/_deps/boost-src/libs/lexical_cast/include",
            "/root/build/great-lakes/_deps/boost-src/libs/container/include",
            "/root/build/great-lakes/_deps/boost-src/libs/intrusive/include",
            "/root/build/great-lakes/_deps/boost-src/libs/move/include",
            "/root/build/great-lakes/_deps/boost-src/libs/numeric/conversion/include",
            "/root/build/great-lakes/_deps/boost-src/libs/tokenizer/include",
            "/root/build/great-lakes/_deps/boost-src/libs/context/include",
            "/root/build/great-lakes/_deps/boost-src/libs/pool/include",
            "/root/build/great-lakes/_deps/boost-src/libs/integer/include",
            "/workspace/common/utility/include",
            "/workspace/common/serialization/include",
            "/root/build/great-lakes/_deps/boost-src/libs/pfr/include",
            "/workspace/common/oglog/include",
            "/workspace/common/redis/include",
            "/root/build/great-lakes/_deps/boost-src/libs/redis/include",
            "/workspace/common/ipc/include",
            "/workspace/common/ogflags/include",
            "/workspace/thirdparty/nlohmann-json/include"
          ],
          "defines": [
            "BOOST_CONTAINER_DYN_LINK",
            "BOOST_CONTAINER_NO_LIB",
            "BOOST_CONTEXT_DYN_LINK=",
            "BOOST_CONTEXT_EXPORT=EXPORT",
            "BOOST_CONTEXT_NO_LIB=",
            "BOOST_DATE_TIME_DYN_LINK",
            "BOOST_DATE_TIME_NO_LIB",
            "GFLAGS_IS_A_DLL=0",
            "ogmon_EXPORTS"
          ],
          "compilerPath": "/var/yocto-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++",
          "compilerArgs": [
            "--sysroot=/var/yocto-sdk/sysroots/cortexa72-poky-linux"
          ],
          "compilerFragments": [
            " -O2 -pipe -g -feliminate-unused-debug-types -g -std=gnu++20 -fPIC",
            "-Wall",
            "-Wextra",
            "-Wno-unused-parameter",
            "-Wno-mismatched-new-delete"
          ]
        }
      },
      {
        "uri": "file:///workspace/system/monitor/src/monitor_controller.cpp",
        "configuration": {
          "includePath": [
            "/workspace/system/monitor/include",
            "/root/build/great-lakes/_deps/boost-src/libs/mp11/include",
            "/workspace/common/asio/include",
            "/root/build/great-lakes/_deps/boost-src/libs/asio/include",
            "/root/build/great-lakes/_deps/boost-src/libs/align/include",
            "/root/build/great-lakes/_deps/boost-src/libs/assert/include",
            "/root/build/great-lakes/_deps/boost-src/libs/config/include",
            "/root/build/great-lakes/_deps/boost-src/libs/core/include",
            "/root/build/great-lakes/_deps/boost-src/libs/static_assert/include",
            "/root/build/great-lakes/_deps/boost-src/libs/throw_exception/include",
            "/root/build/great-lakes/_deps/boost-src/libs/system/include",
            "/root/build/great-lakes/_deps/boost-src/libs/variant2/include",
            "/root/build/great-lakes/_deps/boost-src/libs/winapi/include",
            "/root/build/great-lakes/_deps/boost-src/libs/predef/include",
            "/root/build/great-lakes/_deps/boost-src/libs/date_time/include",
            "/root/build/great-lakes/_deps/boost-src/libs/algorithm/include",
            "/root/build/great-lakes/_deps/boost-src/libs/array/include",
            "/root/build/great-lakes/_deps/boost-src/libs/bind/include",
            "/root/build/great-lakes/_deps/boost-src/libs/concept_check/include",
            "/root/build/great-lakes/_deps/boost-src/libs/preprocessor/include",
            "/root/build/great-lakes/_deps/boost-src/libs/type_traits/include",
            "/root/build/great-lakes/_deps/boost-src/libs/exception/include",
            "/root/build/great-lakes/_deps/boost-src/libs/smart_ptr/include",
            "/root/build/great-lakes/_deps/boost-src/libs/tuple/include",
            "/root/build/great-lakes/_deps/boost-src/libs/function/include",
            "/root/build/great-lakes/_deps/boost-src/libs/iterator/include",
            "/root/build/great-lakes/_deps/boost-src/libs/detail/include",
            "/root/build/great-lakes/_deps/boost-src/libs/fusion/include",
            "/root/build/great-lakes/_deps/boost-src/libs/container_hash/include",
            "/root/build/great-lakes/_deps/boost-src/libs/describe/include",
            "/root/build/great-lakes/_deps/boost-src/libs/function_types/include",
            "/root/build/great-lakes/_deps/boost-src/libs/mpl/include",
            "/root/build/great-lakes/_deps/boost-src/libs/utility/include",
            "/root/build/great-lakes/_deps/boost-src/libs/io/include",
            "/root/build/great-lakes/_deps/boost-src/libs/typeof/include",
            "/root/build/great-lakes/_deps/boost-src/libs/functional/include",
            "/root/build/great-lakes/_deps/boost-src/libs/optional/include",
            "/root/build/great-lakes/_deps/boost-src/libs/range/include",
            "/root/build/great-lakes/_deps/boost-src/libs/conversion/include",
            "/root/build/great-lakes/_deps/boost-src/libs/regex/include",
            "/root/build/great-lakes/_deps/boost-src/libs/unordered/include",
            "/root/build/great-lakes/_deps/boost-src/libs/lexical_cast/include",
            "/root/build/great-lakes/_deps/boost-src/libs/container/include",
            "/root/build/great-lakes/_deps/boost-src/libs/intrusive/include",
            "/root/build/great-lakes/_deps/boost-src/libs/move/include",
            "/root/build/great-lakes/_deps/boost-src/libs/numeric/conversion/include",
            "/root/build/great-lakes/_deps/boost-src/libs/tokenizer/include",
            "/root/build/great-lakes/_deps/boost-src/libs/context/include",
            "/root/build/great-lakes/_deps/boost-src/libs/pool/include",
            "/root/build/great-lakes/_deps/boost-src/libs/integer/include",
            "/workspace/common/utility/include",
            "/workspace/common/serialization/include",
            "/root/build/great-lakes/_deps/boost-src/libs/pfr/include",
            "/workspace/common/oglog/include",
            "/workspace/common/redis/include",
            "/root/build/great-lakes/_deps/boost-src/libs/redis/include",
            "/workspace/common/ipc/include",
            "/workspace/common/ogflags/include",
            "/workspace/thirdparty/nlohmann-json/include"
          ],
          "defines": [
            "BOOST_CONTAINER_DYN_LINK",
            "BOOST_CONTAINER_NO_LIB",
            "BOOST_CONTEXT_DYN_LINK=",
            "BOOST_CONTEXT_EXPORT=EXPORT",
            "BOOST_CONTEXT_NO_LIB=",
            "BOOST_DATE_TIME_DYN_LINK",
            "BOOST_DATE_TIME_NO_LIB",
            "GFLAGS_IS_A_DLL=0",
            "ogmon_EXPORTS"
          ],
          "compilerPath": "/var/yocto-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++",
          "compilerArgs": [
            "--sysroot=/var/yocto-sdk/sysroots/cortexa72-poky-linux"
          ],
          "compilerFragments": [
            " -O2 -pipe -g -feliminate-unused-debug-types -g -std=gnu++20 -fPIC",
            "-Wall",
            "-Wextra",
            "-Wno-unused-parameter",
            "-Wno-mismatched-new-delete"
          ]
        }
      }
    ],
    "partialMatches": [],
    "targetCount": 181,
    "executablesCount": 117,
    "librariesCount": 36,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    }
  ]
}

Debug Log

Please let me know if this is needed.

Additional Information

No response

Metadata

Metadata

Labels

buga bug in the product

Type

No type

Projects

Status

To Do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions