Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command "Show Build Command" fails #2211

Closed
CurtisAMU opened this issue Oct 29, 2021 · 4 comments
Closed

Command "Show Build Command" fails #2211

CurtisAMU opened this issue Oct 29, 2021 · 4 comments
Labels
bug a bug in the product fixed (release pending) fixed in pre-release and is pending official release
Projects
Milestone

Comments

@CurtisAMU
Copy link

CurtisAMU commented Oct 29, 2021

Brief Issue Summary

Running "CMake: Show Build Command" from the VS Code command palette results in an error dialog stating:
Command 'CMake: Show Build Command' resulted in an error (Running the contributed command: 'cmake.showBuildCommand' failed.)
image

The CMake project itself configures and builds without issues, i.e. 'CMake: Build' works fine.

CMake Tools Diagnostics

{
  "os": "win32",
  "vscodeVersion": "1.61.2",
  "cmtVersion": "1.9.1",
  "configurations": [
    {
      "folder": "d:\\Projects\\Misc\\BuildSystem",
      "cmakeVersion": "3.21.3",
      "configured": true,
      "generator": "Ninja Multi-Config",
      "usesPresets": false,
      "compilers": {
        "C": "C:/Keil_v5/ARM/ARMCC/bin/armcc.exe",
        "CXX": "C:/Keil_v5/ARM/ARMCC/bin/armcc.exe"
      }
    }
  ],
  "cpptoolsIntegration": {
    "isReady": true,
    "hasCodeModel": true,
    "activeBuildType": "Debug Cortex-M4 LoMa",
    "buildTypesSeen": [
      "Debug",
      "Release",
      "RelWithDebInfo"
    ],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 1,
    "executablesCount": 1,
    "librariesCount": 0,
    "targets": [
      {
        "name": "AmuTarget",
        "type": "EXECUTABLE"
      }
    ]
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    }
  ]
}

Debug Log

[rollbar] Unhandled exception: Unhandled Promise rejection: showBuildCommand Error: Failed to get build command {}
@bobbrow
Copy link
Member

bobbrow commented Oct 29, 2021

Thanks for reporting this. I have a repro. It seems to work with CMake Presets, but not Kits/Variants.

@andreeis andreeis added the fixed (release pending) fixed in pre-release and is pending official release label Nov 1, 2021
@andreeis andreeis added this to the 1.10.0 milestone Nov 1, 2021
@bobbrow bobbrow modified the milestones: 1.10.0, 1.9.2 Nov 24, 2021
@bobbrow bobbrow added the bug a bug in the product label Nov 24, 2021
@bobbrow bobbrow added this to Done in 1.9.2 Nov 24, 2021
@bobbrow
Copy link
Member

bobbrow commented Nov 24, 2021

We plan to release the fix for this on Monday. If you would like to verify the fix in a pre-release version of the extension, please do the following:

  1. Download the VSIX here: https://github.com/microsoft/vscode-cmake-tools/suites/4455203062/artifacts/118295075
  2. Unzip the VSIX file from the archive
  3. Invoke the Install from VSIX... command in VS Code and select the VSIX file from step 2.

@CurtisAMU
Copy link
Author

Thank you, @bobbrow, that works for me.

@bobbrow
Copy link
Member

bobbrow commented Nov 29, 2021

The fix for this has been released in 1.9.2.

@bobbrow bobbrow closed this as completed Nov 29, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product fixed (release pending) fixed in pre-release and is pending official release
Projects
No open projects
1.9.2
Done
Development

No branches or pull requests

3 participants