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

Fixes #3811 - checks for cmake.exe again if it wasnt present the previous time #3840

Merged
merged 4 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Bug Fixes:
- Fix issue with "Test Results Not Found" when `cmake.ctest.allowParallelJobs` is disabled. [#3798](https://github.com/microsoft/vscode-cmake-tools/issues/3798)
- Update localized strings for Project Status UI and quick pick dropdowns. [#3803](https://github.com/microsoft/vscode-cmake-tools/issues/3803), [#3802](https://github.com/microsoft/vscode-cmake-tools/issues/3802)
- Fix issue where new presets couldn't inherit from presets in CmakeUserPresets.json. These presets are now added to CmakeUserPresets.json instead of CmakePresets.json. [#3725](https://github.com/microsoft/vscode-cmake-tools/issues/3725)
- Fix issue where CMakeTools does not recheck CMake Path to see if user installed CMake after launching VS Code. [3811](https://github.com/microsoft/vscode-cmake-tools/issues/3811)

## 1.18.42

Expand Down
10 changes: 6 additions & 4 deletions src/cmake/cmakeExecutable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ export async function getCMakeExecutableInformation(path: string): Promise<CMake
const normalizedPath = util.platformNormalizePath(path);
if (cmakeInfo.has(normalizedPath)) {
const cmakeExe: CMakeExecutable = cmakeInfo.get(normalizedPath)!;
await setCMakeDebuggerAvailableContext(
cmakeExe.isDebuggerSupported?.valueOf() ?? false
);
return cmakeExe;
if (cmakeExe.isPresent) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we log an error if cmake is not present here?

Is this the case where the user has installed cmake between the time when they opened vscode and their first invocation of configure?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elizabethmorrow Correct, this is the case, but actually broader. It's any case where they open vscode, then install, then do any action where we invoke cmake.exe.

I would agree it's a good idea to log here, @qarni we should do a quick PR for this as well

await setCMakeDebuggerAvailableContext(
cmakeExe.isDebuggerSupported?.valueOf() ?? false
);
return cmakeExe;
}
}

try {
Expand Down
Loading