vscode-cmake-tools
vscode-cmake-tools copied to clipboard
Cancel reconfigure and restart it
Brief Issue Summary
We have a project where cmake configure takes quite some time to complete (magnitude of minutes) In such a project, the automatic reconfigure when you change a CMakeLists.txt is causing quite a slowdown in the workflow. The flow:
- Make a change: triggers the reconfigure
- Fix your type: reconfigure can't start until the previous one is fixed
- Wait until reconfigure is done
- Start the configuration again (happens automatically)
- Wait until configure is done
It would be nice if the previous cmake process (tree) can be canceled whenever a configure is requested. (Either implicitly by changing the CMakeLists.txt or explicitly pressing the "clear cache and configure")
CMake Tools Diagnostics
Debug Log
Additional Information
No response
@JVApen If I'm understanding your issue correctly, I think the easiest way to fix this is to disable the automatic configure using the cmake.configureOnEdit setting.
I'm aware of that option. Though earlier today I was testing with Visual Studio and that one does that cancel. Hence I felt it was worth logging as this can save quite some unneeded computing power on larger projects.
Hi @JVApen thanks for reporting here!
I tried cmake.configureOnEdit setting in VS Code, when setting it to false, automatic reconfigure is not starting if you change a CMakeLists.txt.
We are very happy your issue was resolved. Thanks.
@Amy-Li03 I can work around my issue. I don't consider it solved as I have to do manual actions to trigger the configure.
@JVApen In that case, it sounds like a feature request!
I believe that it should be able to be cancelled, often times I have to click the notifications button in the bottom bar of the screen in order to show the ability to cancel, can you try this? @JVApen Thanks
If I press the cancel button, it indeed cancels, after which I have to press the configure button to start it again.
I think you are correct that all blocks are there and are manually triggerable. The thing I'm asking is that this happens automatically.
@JVApen I'm not sure I understand.
What exactly isn't working for you? I believe there was confirmation that the cmake.configureOnEdit setting makes it so that the automatic configuration doesn't happen, and I think you're saying that the ability to cancel is there as well. What is it that you're saying is missing?
@JVApen OH, are you saying that, in the event that a user has the cmake.configureOnEdit enabled, slightly modify the behavior of the automatic configure to kill the currently running configure and start again?
Currently I believe the most recent configure will fail due to there being an already running configure, but you're saying that it'd be nice, especially in the automatic configure after a saving of the CMakeLists.txt file, to instead kill the current one and start the new one?
Yes, we are aligned. That's exactly what I'm saying
To be clear, it still works as expected if you manually cancel and then run configure right?
Yes, it does