vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

Issue with extension activation

Open bobbrow opened this issue 4 years ago • 8 comments

Can this in any way be disabled over a configuration? We are having currently the issue that the cmakelist.txt will be created after the extension is loaded. But then the extension bar is never loaded.

Originally posted by @JanHildenbrandBosch in https://github.com/microsoft/vscode-cmake-tools/issues/1578#issuecomment-824005940

bobbrow avatar Apr 21 '21 16:04 bobbrow

Can you provide more details as to what you are expecting? I don't understand your description 100%. Is this the case where you open an empty folder, add a CMakeLists.txt to the folder, but the CMake extension doesn't activate?

If that's what you're reporting, I'm not sure if there's an issue for this yet so we can use this to track it. I have seen this behavior before. As a workaround you can activate the extension by running the "CMake: Configure" command.

bobbrow avatar Apr 21 '21 16:04 bobbrow

@bobbrow Sorry for not creating a new issue, I thought it was directly related to the mentioned issue. I think you got my point. Let me elaborate a bit:

In our dev environment (which is inside a docker container) we set the cmake source directory ("cmake.sourceDirectory" : "/src") to a non-existing path for example "/src". Because of some performance reasons we copy our source code from the mounted directory to "/src" before each cmake call. After recreating the environment (which can happen somewhat frequently) the "/src" folder is empty, and therefore the cmake bar at the bottom is vanished since version 1.7.0, in previous versions this was not a problem.

I'd would be nice for us to configure, that the cmake extension is not automatically disabling if there is no CMakeLists.txt present. We got already a workaround by initially setting up the "/src" folder before starting the extension, but I was curious, whether this can also be just configured in the extension.

JanHildenbrandBosch avatar Apr 22 '21 08:04 JanHildenbrandBosch

@JanHildenbrandBosch, even if the bottom status bar is hidden (because we detect that we don't have a valid CMake project) the command "CMake: Configure" is still available in the palette. What did you do before when the status bar remained visible? You were pressing one of the buttons anyway, to trigger a configure, right? Now you would have to run the configure command from the palette. Is this too inconvenient? Of course we can add a setting but considering that the majority of our users prefer having the UI elements hidden for non CMake projects and that we already have numerous settings, we just think twice before adding a new one. Let us know how such new setting would help your development scenario. We will also make sure the full activation happens automatically when a CMakeLists.txt appears (which is why we keep this GitHub report open).

andreeis avatar Apr 22 '21 16:04 andreeis

It's fine from my side, I understand the concern of hiding the UI and adding too much configuration.

For me personally it is fine to use the command palette, but we maintain one devcontainer for a lot of different developers with different technical background. The status bar is very easy to use and the change in 1.7.0 disrupted their known workflow for some developers.

Our "workaround" works fine, so we can live without the setting :).

JanHildenbrandBosch avatar Apr 23 '21 07:04 JanHildenbrandBosch

Ok, thank you for the follow up. Then we will keep this report for making sure we can transition easily from a non CMake project to a suddenly appearing CMakeLists.txt.

andreeis avatar Apr 23 '21 15:04 andreeis

This issue is now marked as 'stale-old' due to there being no activity on it for the past 720 days. Unless the 'stale-old' label is removed or the issue is commented on, this will be remain open for at least 14 days and then it may be closed. If you would like to make this issue exempt from getting stale, please add the 'stale-exempt' label.

github-actions[bot] avatar Oct 19 '23 16:10 github-actions[bot]

This issue is now closed due to there being no activity on it for the past 14 days since being marked as 'stale-old'.

github-actions[bot] avatar Nov 14 '23 20:11 github-actions[bot]

This issue is still relevant - I have been manually creating CMakeLists.txt in my projects after launching VSCode; and not being familiar with the command palette, I find myself looking for the CMake Tools interface to begin building. It would help my workflow if the extension could automatically activate as suggested above. If that is not possible, at least having the option to persist an always-on GUI element for manually triggering the extension to configure (and activate) would be a useful feature to have.

recursivenomad avatar Jan 24 '24 01:01 recursivenomad