Skip to content

Commit 838ff62

Browse files
authored
Merge pull request microsoft#185812 from microsoft/merogge/workspace-tasks
Revert "Fix accidently starting all onTaskType extensions when running a build command"
2 parents 9c91f67 + bab55ca commit 838ff62

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

src/vs/workbench/contrib/tasks/browser/abstractTaskService.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
723723
});
724724
}
725725

726-
public async getTask(folder: IWorkspace | IWorkspaceFolder | string, identifier: string | ITaskIdentifier, compareId: boolean = false, type: string | undefined = undefined): Promise<Task | undefined> {
726+
public async getTask(folder: IWorkspace | IWorkspaceFolder | string, identifier: string | ITaskIdentifier, compareId: boolean = false): Promise<Task | undefined> {
727727
if (!(await this._trust())) {
728728
return;
729729
}
@@ -760,7 +760,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
760760
}
761761

762762
// We didn't find the task, so we need to ask all resolvers about it
763-
const map = await this._getGroupedTasks({ type });
763+
const map = await this._getGroupedTasks();
764764
let values = map.get(folder);
765765
values = values.concat(map.get(USER_TASKS_GROUP_KEY));
766766

@@ -1834,12 +1834,11 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
18341834
await this._updateWorkspaceTasks();
18351835
const taskFolder = task.getWorkspaceFolder();
18361836
const taskIdentifier = task.configurationProperties.identifier;
1837-
const taskType = CustomTask.is(task) ? task.customizes()?.type : (ContributedTask.is(task) ? task.type : undefined);
18381837
// Since we save before running tasks, the task may have changed as part of the save.
18391838
// However, if the TaskRunSource is not User, then we shouldn't try to fetch the task again
18401839
// since this can cause a new'd task to get overwritten with a provided task.
18411840
taskToRun = ((taskFolder && taskIdentifier && (runSource === TaskRunSource.User))
1842-
? await this.getTask(taskFolder, taskIdentifier, false, taskType) : task) ?? task;
1841+
? await this.getTask(taskFolder, taskIdentifier) : task) ?? task;
18431842
}
18441843
await ProblemMatcherRegistry.onReady();
18451844
const executeResult = runSource === TaskRunSource.Reconnect ? this._getTaskSystem().reconnect(taskToRun, resolver) : this._getTaskSystem().run(taskToRun, resolver);

src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,6 @@ namespace Configuration {
8383

8484
const taskDefinitionsExtPoint = ExtensionsRegistry.registerExtensionPoint<Configuration.ITaskDefinition[]>({
8585
extensionPoint: 'taskDefinitions',
86-
activationEventsGenerator: (contributions: Configuration.ITaskDefinition[], result: { push(item: string): void }) => {
87-
for (const task of contributions) {
88-
if (task.type) {
89-
result.push(`onTaskType:${task.type}`);
90-
}
91-
}
92-
},
9386
jsonSchema: {
9487
description: nls.localize('TaskDefinitionExtPoint', 'Contributes task kinds'),
9588
type: 'array',

0 commit comments

Comments
 (0)