microsoft / microsoft/vscode-cmake-tools

Please kindly re-add `autoRestartBuild` configuration, to allow to re-start a running build

Open
#2,576 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Feature: build help wanted
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### Brief Issue Summary

This is a feature request. When I have a build running, but I modify a file and try to restart the build, I get an error pop-up with the message `A CMake task is already running. Stop it before trying to build`. Instead of the popup, I would prefer if the current build would be cancelled and a new build started. This would in my humble opinion make more sense, and also require less mouse interaction.

I would prefer that the current build was cancelled and a new build started instead. To me this seems really what users want when they start a build while another one is running already. The popup dialog seems not really to be what users want, since it does not really provide much value(?)

Since our builds take a rather long time to abort (even in case of an error), I run into this issue many times a day.

I have also seen that this feature has been requested before and even has been implemented before! However it was removed, possibly in misunderstanding or error. The feature was originally requested in #318, with description:
> Running build when another build is running results in an error pop up with this message:
>
>> A CMake task is already running. Stop it before trying to build.
>
> This is reasonable, but a bit annoying as this pupup must be closed by clicking the "Close" button. The only way that I know of that stops the build is the little "stop" icon at the bottom.
> I suggest that if you invoke the cmake.build (F7 by default) command twice in a short interval such as one second, the current build is cancelled, the popup is closed, and a new build starts.

The feature was subsequently implemented in https://github.com/microsoft/vscode-cmake-tools/pull/325/files

Then the feature has been removed in 6d04ebd7d1e86c11d17f28296a0d9d22e2fabee0 with description:
> - Remove not required configuration setting `autoRestartBuild`
> I was not able to bring the driver into a state where two
> builds run in parallel. The `CMakePreconditionProblemSolver`
> never signals `busy` CMake.

I'm not sure why this removal was done. But in any case, the original request is still very valid for me (and possible the other users too).

### CMake Tools Diagnostics

_No response_

### Debug Log

_No response_

### Additional Information

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the autoRestartBuild configuration history, linked PR #325, and removal commit 6d04ebd7d1e86c11d17f28296a0d9d22e2fabee0. Start at the cmake.build command when a build is already running; done means the active build is cancelled and a new build starts without the error popup.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, typescript
Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
39/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.