Feature: Tasks (core) (#12184)

* initial

* string sanitize

* hygiene

* build task

* added build task

* hygiene

* initial tasks view

* finished tasks

* add sql carbon tags and undo changes

* remove task message

* fix tasks tests

* removed extension stuff

* add problem matcher

* remove extra space

* undo extension changes

* add problem matcher to mssql
This commit is contained in:
Aditya Bist
2020-11-04 13:07:20 -08:00
committed by GitHub
parent 4af67c9734
commit 6b2c409cff
11 changed files with 90 additions and 36 deletions

View File

@@ -59,7 +59,7 @@ import './mainThreadWebviewManager';
import './mainThreadWorkspace';
import './mainThreadComments';
import './mainThreadNotebook';
// import './mainThreadTask'; {{SQL CARBON EDIT}} @anthonydresser comment out task
import './mainThreadTask';
import './mainThreadLabelService';
import './mainThreadTunnelService';
import './mainThreadAuthentication';

View File

@@ -60,7 +60,7 @@ import { ExtHostLabelService } from 'vs/workbench/api/common/extHostLabelService
import { getRemoteName } from 'vs/platform/remote/common/remoteHosts';
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { IExtHostDecorations } from 'vs/workbench/api/common/extHostDecorations';
// import { IExtHostTask } from 'vs/workbench/api/common/extHostTask';
import { IExtHostTask } from 'vs/workbench/api/common/extHostTask';
// import { IExtHostDebugService } from 'vs/workbench/api/common/extHostDebugService';
import { IExtHostSearch } from 'vs/workbench/api/common/extHostSearch';
import { ILogService } from 'vs/platform/log/common/log';
@@ -124,7 +124,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
const extHostTerminalService = rpcProtocol.set(ExtHostContext.ExtHostTerminalService, accessor.get(IExtHostTerminalService));
// const extHostDebugService = rpcProtocol.set(ExtHostContext.ExtHostDebugService, accessor.get(IExtHostDebugService)); {{SQL CARBON EDIT}} remove debug service
const extHostSearch = rpcProtocol.set(ExtHostContext.ExtHostSearch, accessor.get(IExtHostSearch));
// const extHostTask = rpcProtocol.set(ExtHostContext.ExtHostTask, accessor.get(IExtHostTask)); {{SQL CARBON EDIT}} remove tasks service
const extHostTask = rpcProtocol.set(ExtHostContext.ExtHostTask, accessor.get(IExtHostTask));
const extHostOutputService = rpcProtocol.set(ExtHostContext.ExtHostOutputService, accessor.get(IExtHostOutputService));
// manually create and register addressable instances
@@ -155,8 +155,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
// Check that no named customers are missing
// {{SQL CARBON EDIT}} filter out the services we don't expose
const filtered: ProxyIdentifier<any>[] = [ExtHostContext.ExtHostDebugService, ExtHostContext.ExtHostTask];
const filtered: ProxyIdentifier<any>[] = [ExtHostContext.ExtHostDebugService];
const expected: ProxyIdentifier<any>[] = values(ExtHostContext).filter(v => !filtered.find(x => x === v));
rpcProtocol.assertRegistered(expected);
// Other instances
@@ -755,7 +756,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
return extHostDocumentContentProviders.registerTextDocumentContentProvider(scheme, provider);
},
registerTaskProvider: (type: string, provider: vscode.TaskProvider) => {
throw new Error('Tasks api is not allowed in Azure Data Studio'); // {{SQL CARBON EDIT}} disable task
extHostApiDeprecation.report('window.registerTaskProvider', extension,
`Use the corresponding function on the 'tasks' namespace instead`);
return extHostTask.registerTaskProvider(extension, type, provider);
},
registerFileSystemProvider(scheme, provider, options) {
return extHostFileSystem.registerFileSystemProvider(scheme, provider, options);
@@ -911,38 +915,30 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
}
};
const tasks: typeof vscode.tasks = { // {{SQL CARBON EDIT}} disable tasks api
const tasks: typeof vscode.tasks = {
registerTaskProvider: (type: string, provider: vscode.TaskProvider) => {
extHostLogService.warn('Tasks API is disabled in Azure Data Studio');
return undefined!;
return extHostTask.registerTaskProvider(extension, type, provider);
},
fetchTasks: (filter?: vscode.TaskFilter): Thenable<vscode.Task[]> => {
extHostLogService.warn('Tasks API is disabled in Azure Data Studio');
return undefined!;
return extHostTask.fetchTasks(filter);
},
executeTask: (task: vscode.Task): Thenable<vscode.TaskExecution> => {
extHostLogService.warn('Tasks API is disabled in Azure Data Studio');
return undefined!;
return extHostTask.executeTask(extension, task);
},
get taskExecutions(): vscode.TaskExecution[] {
extHostLogService.warn('Tasks API is disabled in Azure Data Studio');
return undefined!;
return extHostTask.taskExecutions;
},
onDidStartTask: (listeners, thisArgs?, disposables?) => {
extHostLogService.warn('Tasks API is disabled in Azure Data Studio');
return undefined!;
return extHostTask.onDidStartTask(listeners, thisArgs, disposables);
},
onDidEndTask: (listeners, thisArgs?, disposables?) => {
extHostLogService.warn('Tasks API is disabled in Azure Data Studio');
return undefined!;
return extHostTask.onDidEndTask(listeners, thisArgs, disposables);
},
onDidStartTaskProcess: (listeners, thisArgs?, disposables?) => {
extHostLogService.warn('Tasks API is disabled in Azure Data Studio');
return undefined!;
return extHostTask.onDidStartTaskProcess(listeners, thisArgs, disposables);
},
onDidEndTaskProcess: (listeners, thisArgs?, disposables?) => {
extHostLogService.warn('Tasks API is disabled in Azure Data Studio');
return undefined!;
return extHostTask.onDidEndTaskProcess(listeners, thisArgs, disposables);
}
};

View File

@@ -11,7 +11,7 @@ import { IExtHostConfiguration, ExtHostConfiguration } from 'vs/workbench/api/co
import { IExtHostCommands, ExtHostCommands } from 'vs/workbench/api/common/extHostCommands';
import { IExtHostDocumentsAndEditors, ExtHostDocumentsAndEditors } from 'vs/workbench/api/common/extHostDocumentsAndEditors';
import { IExtHostTerminalService, WorkerExtHostTerminalService } from 'vs/workbench/api/common/extHostTerminalService';
// import { IExtHostTask, WorkerExtHostTask } from 'vs/workbench/api/common/extHostTask';
import { IExtHostTask, WorkerExtHostTask } from 'vs/workbench/api/common/extHostTask';
// import { IExtHostDebugService, WorkerExtHostDebugService } from 'vs/workbench/api/common/extHostDebugService';
import { IExtHostSearch, ExtHostSearch } from 'vs/workbench/api/common/extHostSearch';
import { IExtensionStoragePaths, ExtensionStoragePaths } from 'vs/workbench/api/common/extHostStoragePaths';
@@ -34,7 +34,7 @@ registerSingleton(IExtHostFileSystemInfo, ExtHostFileSystemInfo);
registerSingleton(IExtHostOutputService, ExtHostOutputService);
registerSingleton(IExtHostSearch, ExtHostSearch);
registerSingleton(IExtHostStorage, ExtHostStorage);
// registerSingleton(IExtHostTask, WorkerExtHostTask);
registerSingleton(IExtHostTask, WorkerExtHostTask);
registerSingleton(IExtHostTerminalService, WorkerExtHostTerminalService);
registerSingleton(IExtHostTunnelService, ExtHostTunnelService);
registerSingleton(IExtHostWindow, ExtHostWindow);

View File

@@ -6,7 +6,7 @@
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { ExtHostOutputService2 } from 'vs/workbench/api/node/extHostOutputService';
import { ExtHostTerminalService } from 'vs/workbench/api/node/extHostTerminalService';
// import { ExtHostTask } from 'vs/workbench/api/node/extHostTask';
import { ExtHostTask } from 'vs/workbench/api/node/extHostTask';
// import { ExtHostDebugService } from 'vs/workbench/api/node/extHostDebugService';
import { NativeExtHostSearch } from 'vs/workbench/api/node/extHostSearch';
import { ExtHostExtensionService } from 'vs/workbench/api/node/extHostExtensionService';
@@ -16,7 +16,7 @@ import { ExtHostTunnelService } from 'vs/workbench/api/node/extHostTunnelService
import { IExtHostExtensionService } from 'vs/workbench/api/common/extHostExtensionService';
import { IExtHostOutputService } from 'vs/workbench/api/common/extHostOutput';
import { IExtHostSearch } from 'vs/workbench/api/common/extHostSearch';
// import { IExtHostTask } from 'vs/workbench/api/common/extHostTask';
import { IExtHostTask } from 'vs/workbench/api/common/extHostTask';
import { IExtHostTerminalService } from 'vs/workbench/api/common/extHostTerminalService';
import { IExtHostTunnelService } from 'vs/workbench/api/common/extHostTunnelService';
import { ILogService } from 'vs/platform/log/common/log';
@@ -33,6 +33,6 @@ registerSingleton(ILogService, ExtHostLogService);
// registerSingleton(IExtHostDebugService, ExtHostDebugService);
registerSingleton(IExtHostOutputService, ExtHostOutputService2);
registerSingleton(IExtHostSearch, NativeExtHostSearch);
// registerSingleton(IExtHostTask, ExtHostTask);
registerSingleton(IExtHostTask, ExtHostTask);
registerSingleton(IExtHostTerminalService, ExtHostTerminalService);
registerSingleton(IExtHostTunnelService, ExtHostTunnelService);