Skip to content

Fix configure preset used in workflow preset defined in CMakeUserPresets.json - #4202

Merged
Garrett Campbell (gcampbell-msft) merged 3 commits into
microsoft:mainfrom
nikobockerman:fix-workflow-preset-referencing-configure-preset-in-user-presets
Dec 10, 2024
Merged

Garrett Campbell (gcampbell-msft) merged 3 commits into
microsoft:mainfrom
nikobockerman:fix-workflow-preset-referencing-configure-preset-in-user-presets

Conversation

@nikobockerman

Copy link
Copy Markdown
Contributor

Previously, when workflow preset in CMakeUserPresets.json references configure preset that is also defined in CMakeUserPresets.json, this extension reports an error that the configure preset can't be found.
And that results in the CMakeUserPresets.json getting ignored along with all presets defined in it.

This commits fixes this problem by adding a lookup from userConfigurePresets in case the configure preset isn't found in configurePresets.

Previously, when workflow preset in CMakeUserPresets.json references
configure preset that is also defined in CMakeUserPresets.json,
this extension reports an error that the configure preset can't be
found.
And that results in the CMakeUserPresets.json getting ignored along
with all presets defined in it.

This commits fixes this problem by adding a lookup from
userConfigurePresets in case the configure preset isn't found in
configurePresets.
@gcampbell-msft

Copy link
Copy Markdown
Collaborator

Niko Hämäläinen (@nikobockerman) Approved, but can you also add a CHANGELOG.md update?

@nikobockerman

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@gcampbell-msft
Garrett Campbell (gcampbell-msft) merged commit 5bed54c into microsoft:main Dec 10, 2024
hippo91 pushed a commit to hippo91/vscode-cmake-tools that referenced this pull request Dec 21, 2024
…ets.json (microsoft#4202)

* Fix workflow preset configure in user presets

Previously, when workflow preset in CMakeUserPresets.json references
configure preset that is also defined in CMakeUserPresets.json,
this extension reports an error that the configure preset can't be
found.
And that results in the CMakeUserPresets.json getting ignored along
with all presets defined in it.

This commits fixes this problem by adding a lookup from
userConfigurePresets in case the configure preset isn't found in
configurePresets.

* Add CHANGELOG entry

---------

Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
@Amy-Li03

v-amyli3 (Amy-Li03) commented Feb 21, 2025 •

Copy link
Copy Markdown
Collaborator

Verified this issue on cmake tools v1.20.50(pre-release) & v1.20.52(release), issue was fixed. We can find the configure preset and workflow preset when workflow preset in CMakeUserPresets.json references configure preset that is also defined in CMakeUserPresets.json. Please see following recording:
Fixed

@nikobockerman
Niko Hämäläinen (nikobockerman) deleted the fix-workflow-preset-referencing-configure-preset-in-user-presets branch February 21, 2025 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants