microsoft / microsoft/vscode-cmake-tools

Hold or freeze on the CMake Tools Extension

Open
#4,152 9 comments 0 reactions 0 assignees View on GitHub
enhancement Feature: configure
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### Brief Issue Summary

Background. We have a large project where we generate the CMake files and other files. The script that does this can set up the project in many different ways. It is common that we switch between different setups and we also regularly run this script when the source is updated from our SCM.

Behavior: If we generate the CMake files while VS Code is open, files often gets corrupted and the project behaves in various strange ways. The workaround is to always close VS Code, run the script, and start VS Code again. This is inconvenient and sometimes we forget to close VS Code.

Question: Is there a way for this extension to not run CMake (or whatever else is handling this) when we generate the CMake files without closing VS Code? Could we simply delete the top level CMakeLists.txt file,
write all the other files, and recreate the top level CMakeLists.txt file last (maybe atomically through a rename)?

Suggestion: If there is no such mechanism, one solution is to implement a command line option to VS Code that can place a request with VS Code to hold/freeze/lock the extension for the workspace and similarly to release it. Such a mechanism need to take into account that VS code may not be running or VS Code exits while a hold is in place.

Usage: Our script would place a request with VS Code to hold/freeze/lock the extension for the workspace. Generate the CMake files. Release the hold with VS Code when we are done.

### CMake Tools Diagnostics

_No response_

### Debug Log

_No response_

### Additional Information

Some related issues are #3994 #3963 #3930

Contributor guide

Open the contributing guide

Research direction

No source files, tests, or entry points are named. Start by reviewing related issues #3994, #3963, and #3930, then trace how the extension reacts to regenerated CMake files and how VS Code workspace commands are exposed. Done means defining and implementing an agreed hold/release mechanism or an approved safe-generation behavior, including cases where VS Code is not running or exits.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, typescript, vscode
Domain
build-system, developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.