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

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

Conversation

nikobockerman
Copy link
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
gcampbell-msft previously approved these changes Dec 9, 2024
@gcampbell-msft
Copy link
Collaborator

@nikobockerman Approved, but can you also add a CHANGELOG.md update?

@nikobockerman
Copy link
Contributor Author

@microsoft-github-policy-service agree

@gcampbell-msft gcampbell-msft merged commit 5bed54c into microsoft:main Dec 10, 2024
4 checks passed
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
Copy link
Collaborator

Amy-Li03 commented Feb 21, 2025

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 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants