Skip to content

Add "Delete Cache, Reconfigure and Build" command - #4723

Merged
snehara99 merged 5 commits into
mainfrom
copilot/delete-cache-and-build
Feb 13, 2026
Merged

snehara99 merged 5 commits into
mainfrom
copilot/delete-cache-and-build

Conversation

Copilot AI commented Feb 12, 2026 •

Copy link
Copy Markdown
Contributor

This change addresses item #4294

This changes visible behavior

The following changes are proposed:

  • Add cleanConfigureAndBuild method to CMakeProject that chains cleanConfigure() + build(), short-circuiting on configure failure (mirrors cleanRebuild() pattern)
  • Add cleanConfigureAndBuild / cleanConfigureAndBuildAll commands to ExtensionManager with telemetry and build preset validation
  • Register commands in package.json (command palette, outline view title, CMakeLists.txt context menus, explorer context)
  • Add localization strings: "Delete Cache, Reconfigure and Build" / "Delete Cache, Reconfigure and Build All Projects"
  • Update CHANGELOG.md with the new feature entry under version 1.23

The purpose of this change

Users who need to delete cache and reconfigure due to a broken build folder currently must wait for reconfiguration to complete, then manually trigger a build. This adds a single command that chains both operations so the user can walk away and return when everything is done.

Other Notes/Information

Core logic in cmakeProject.ts:

async cleanConfigureAndBuild(trigger: ConfigureTrigger = ConfigureTrigger.api): Promise<number> {
    const configureResult = (await this.cleanConfigure(trigger)).exitCode;
    if (configureResult !== 0) {
        return configureResult;
    }
    return (await this.build()).exitCode;
}

The cmake.outline.cleanConfigureAndBuild command is defined but not explicitly registered in extension.ts — this is consistent with existing outline commands like cmake.outline.cleanRebuild and cmake.outline.cleanConfigure which follow the same pattern (hidden via "when": "never" in command palette).

Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature] "Delete Cache and Reconfigure" and Build</issue_title>
<issue_description>### Request Overview

When my build folder is broken, I always would like to delete cache / reconfigure and Build.

Instead of "Delete Cache and Reconfigure", wait 2 minutes, comes back, click "Build" and wait 5 minutes.

I would like to come back only once after 7 minutes.

Additional Information

No response</issue_description>

Comments on the Issue (you are Copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 12, 2026 19:44
Add cleanConfigureAndBuild and cleanConfigureAndBuildAll commands that
chain cleanConfigure + build operations, allowing users to delete cache,
reconfigure, and build in a single action without manual intervention.

Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
Copilot AI changed the title [WIP] Add functionality to delete cache and build Feb 12, 2026
Copilot AI requested a review from snehara99 February 12, 2026 19:50
@snehara99

Copy link
Copy Markdown
Contributor

Copilot could you update the changelog with this as a feature, citing this pr (#4723)

Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>

Copilot AI commented Feb 13, 2026

Copy link
Copy Markdown
Contributor Author

Copilot could you update the changelog with this as a feature, citing this pr (#4723)

Added the changelog entry in commit 09811de under the 1.23 Features section.

@snehara99 snehara99 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

validated locally

@snehara99
snehara99 marked this pull request as ready for review February 13, 2026 21:05
@snehara99
snehara99 enabled auto-merge (squash) February 13, 2026 21:06
@snehara99
snehara99 merged commit 6db4af5 into main Feb 13, 2026
4 checks passed
@snehara99
snehara99 deleted the copilot/delete-cache-and-build branch February 13, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants