Conversation
…file to allow the global tasks run to show up for the profile across different workspaces
|
@microsoft-github-policy-service agree company="Google" |
|
Hey and thank you for the PR. A task providing extension should only be providing tasks that have something to do with the currently opened folder or workspace - not per profile, since tasks are a workspace/folder concept. For example, certain scripts won't exist outside of a folder that might be used by a task. Can you pls help me understand your use case better? |
|
Hi Megan, Thanks for the quick feedback. In our use case, all code changes are done on a single version of the code that the changes are then routinely submitted back to the main version. Workspaces in that case represents just a different taken copy of the code that the developer would use to apply their changes and then merge back. We run builds and tests using vscode tasks that define some targets and flags that define the run. We have an extension that provides and resolves those tasks which are Custom execution tasks and not scripts. Our extension can provide some of the tasks for the current open files user has but these tasks are usually more involved requiring specific setup from the user. The user then defines and runs build or test tasks for the projects they work on within the repository. When creating a new workspace to work on a new change, they would expect to see the tasks they recently run/persisted after In short workspaces, are disposable snapshots where a user works on a specific change, running the tasks they had defined to test their project and then submit the change and disposing of the workspace, and then moving to a new workspace to work on another change which they'd expect to have the same tasks to run. We had made this change on our internal version to address that need, but I understand this might not be the approach that this project would want to take, but we saw some value in our use case to give the ability for extensions to have global tasks. |
Resolves #167283
This PR passes the information of the provided task scope allowing extensions to provide global tasks and also persists the recent tasks per profile so global run tasks can be available across workspaces.
This was implemented internally to have workspaces that share the same source code (a monorepo) to then save a build task once and then access it from different created workspaces, and also to view a recently run task on a workspace to run it from a different workspace. For workspace-scoped tasks they remain visible only in their workspace and are configured or saved to the workspace tasks.json.