microsoft / vscode-cmake-tools

CMake integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools
MIT License
1.48k stars 454 forks source link

$env in cmakeExecutable in Preset not working since 1.19.49 #4035

Closed KUGA2 closed 2 months ago

KUGA2 commented 2 months ago

Brief Issue Summary

Since the newest version, our Presets do not work any more.

Configuring gives the following error message:

[cmakeExecutable] CMake executable not found in cache. Checking again.
[proc] Executing command: /cmake.exe --version
[proc] The command: /cmake.exe --version failed with error: Error: spawn /cmake.exe ENOENT
[proc] Executing command: /cmake.exe -E capabilities
[proc] The command: /cmake.exe -E capabilities failed with error: Error: spawn /cmake.exe ENOENT
[main] Configuring project: ---

As you can see, the path is incomplete. It does not resolve out preset correctly anymore. We have this line there:

            "cmakeExecutable": "$env{CMAKE3271}/cmake.exe"

We only use this setting in Windows, i am not sure if this bug appears in other OSes.

Workaround:

(I am not adding logs here, because I would need to manually remove confidential data. If you cannot reproduce, please contact me)

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

staffanf commented 2 months ago

Thanks for reporting. We got the same issue today which make our cross-compiles fail. Both downgrading and upgrading to pre-release seems to fix the issue.

Please make this fix high prio since I haven't found a way to pin the version in our devcontainer.json

gcampbell-msft commented 2 months ago

@KUGA2 Thanks for the issue, @staffanf thanks for testing and confirming that it is fixed in pre-release, we are aware of the issue and plan to patch the official release version this week. We agree it is high priority.

KUGA2 commented 2 months ago

Fixed with v1.19.50