From e31987c077ec72d81eaee099cd187291f7d68fb8 Mon Sep 17 00:00:00 2001 From: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com> Date: Tue, 2 Jan 2024 01:24:06 -0500 Subject: [PATCH] ensure we apply our presets to local cache (#3503) * ensure we apply our presets to local cache * update changelog * update changelog --------- Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com> --- CHANGELOG.md | 2 +- src/presetsController.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c49af89ed..d4c83d8fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ Bug Fixes: - Fixed an issue where changing an empty value to a non-empty value using the Cache Editor UI didn't work. [PR #3508](https://github.com/microsoft/vscode-cmake-tools/pull/3508) - Fix CMakePresets inheritance for the `condition` field. [PR #3494](https://github.com/microsoft/vscode-cmake-tools/pull/3494) -- Ensure that the output is cleared for `debugTarget` and `launchTarget` [#3489](https://github.com/microsoft/vscode-cmake-tools/issues/3489) +- Ensure that the output is cleared for `debugTarget` and `launchTarget`. [#3489](https://github.com/microsoft/vscode-cmake-tools/issues/3489) - Fix the inheritance of the `environment` for CMakePresets. [#3473](https://github.com/microsoft/vscode-cmake-tools/issues/3473) - Removed an unnecessary `console.assert` [#3474](https://github.com/microsoft/vscode-cmake-tools/issues/3474) - Make sure we clear the output on builds due to test when `Clear output before build` is enabled. [#1179](https://github.com/microsoft/vscode-cmake-tools/issues/1179) diff --git a/src/presetsController.ts b/src/presetsController.ts index e609bb617..569161d0a 100644 --- a/src/presetsController.ts +++ b/src/presetsController.ts @@ -392,6 +392,9 @@ export class PresetsController { await this.addPresetAddUpdate(newPreset, 'configurePresets'); if (isMultiConfigGenerator) { + // Ensure that we update our local copies of the PresetsFile so that adding the build preset happens as expected. + await this.reapplyPresets(); + const buildPreset: preset.BuildPreset = { name: `${newPreset.name}-debug`, displayName: `${newPreset.displayName} - Debug`,