-
Notifications
You must be signed in to change notification settings - Fork 460
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
Fix 3232 #4223
Open
hippo91
wants to merge
13
commits into
microsoft:main
Choose a base branch
from
hippo91:fix_3232
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix 3232 #4223
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also pass the workspaceFolder to the provideTask method
This is necessary to make each task run in the correct project
It is a simple delegation to the eponym method of projectController
Using workspaceFolder scope allows to retrieve the project using this folder
…esetNameForProject function
It is mostly a delegation to the eponym method of the projectController
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change addresses item #3232
This changes visible behavior
The following changes are proposed:
ExtensionManager
class (getAllCMakeProjects
,getProjectForFolder
). They are just delegations to theprojectController
object.findBuildTask
method of theCMakeTaskProvider
is expecting a workspace folder (under string form) as first argument. Its call site in thecmakeDriver.ts
file is updated accordinglyprovideTasks
method of theCMakeTaskProvider
does not deal with the active project anymore but loop over all the CMake projects of the workspace to build the task list.provideTask
method of theCMakeTaskProvider
is expecting a workspace folder as 2nd argument so that the scope of each task is the given workspace folder. This folder is also used to specialize the task definition label in order for the definition to be unique for each task (even for the same task type of two different workspace folders). Last but not least, the workspace folder is also passed to the constructor of theCustomBuildTaskTerminal
CustomBuildTaskTerminal
does not rely only on theactiveProject
anymore. Instead, if aworkspaceFolder
member is defined, then thegetProject
method (formerlygetActiveProject
method) return the project associated to the workspace folder.At first sight solving #3232 should have been as easy as looping over each
CMake
project of the workspace to build the list of available tasks (in theprovideTasks
method). But as lot of pieces of theCMakeTaskProvider
andCustomBuildTaskTerminal
were relying on working on the active project, i had no other choice that modifying them so that they could work on any project the workspace folder is given.Other Notes/Information
Please tell me if it is possible to add tests for task selection. I will be pleased to implement them.