-
Notifications
You must be signed in to change notification settings - Fork 483
Add cmake.exclude
setting to allow for multi-root scenarios to ignore certain folders
#4440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added the ignoredFolders setting in the code such that it compiles. TODO to implement the usage of this setting in the extension.
…hat I think we should refactor
…en sourceDirectory is changed
cmake.ignoredFolders
setting to allow for multi-root scenarios to ignore certain folders
@danniesim I'd appreciate your review and feedback, as you've worked and helped post issues in this space. You can either test with this locally, or you could use this .vsix. |
cmake.ignoredFolders
setting to allow for multi-root scenarios to ignore certain folderscmake.exclude
setting to allow for multi-root scenarios to ignore certain folders
TODO: Investigate and confirm that default active folder is handled correctly and the active folder selection, related settings: |
Will do. Thanks! |
@danniesim I've made a couple of updates, so it'd be better to test locally rather than the previously uploaded vsix, just FYI. Thanks! |
@danniesim I've gotten approval from some team members, so please keep me in the loop with any testing you do. I'd love to merge this PR this week or next. I understand you likely have many other things taking your attention, so no worries, I just wanted to check with you since you've helped contribute to this area. Thanks! |
…com/microsoft/vscode-cmake-tools into dev/gcampbell/MultiRootImprovements
@gcampbell-msft It works, nice one, and thanks to all contributors. However, absolute paths are not great. Paths relative to the workspace file would be better as it would be portable to anywhere/path/machine the repo is cloned to. See screenshot for how it works on my workspace: |
@danniesim Thanks for the feedback! I did consider this, but for the initial MVP I wanted to make sure we didn't introduce confusion, and relative paths introduce difficulties if people set this at the user level. However, we are more than willing to consider this, please create a feature request and we'll do our best to prioritize it accordingly. Thanks! |
@gcampbell-msft Perhaps something like this "${workspaceFolder}/project_folder" (The Python extension supports this) |
Add
cmake.exclude
setting to allow for users to, in both theUser
andWorkspace
vscode settings, specifically ignore folders in a multi-root scenario that they don't want the CMake Tools extension to acknowledge.Fixes #1069.
Fixes #4112.
We believe that this solves the issues that users had mentioned in #4112 and associated bugs, because it allows users to specifically ignore folders that they don't want acknowledged. There are two main scenarios that this could happen.
cmake.exclude
setting to ignore certain folders.cmake.sourceDirectory
. In this case, users can be selective in theircmake.sourceDirectory
setting, and by omitting any folders they don't want handled by CMake Tools, they can effectively be ignored.This may still hit, in a "True" multi-root scenario, a pop-up asking you if you want to configure with CMake Tools in a non-CMake folder, but you can use this feature to ignore it after this.