Skip to content

Commit a0579e6

Browse files
authored
Remove IJMPConnection and uses of it while maintaining same tests (microsoft#11503)
* Remove IJMPConnection and uses of it while maintaining same tests * Fix linter error
1 parent b7ade14 commit a0579e6

11 files changed

Lines changed: 133 additions & 670 deletions

File tree

news/3 Code Health/11470.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove IJMPConnection implementation while maintaining tests written for it.

src/client/datascience/raw-kernel/enchannel-zmq-backend-6/index.ts

Lines changed: 0 additions & 286 deletions
This file was deleted.

src/client/datascience/raw-kernel/enchannelJMPConnection.ts

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/client/datascience/raw-kernel/rawKernel.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import type { Kernel, KernelMessage, ServerConnection } from '@jupyterlab/servic
44
import * as uuid from 'uuid/v4';
55
import { isTestExecution } from '../../common/constants';
66
import { IDisposable } from '../../common/types';
7-
import { noop } from '../../common/utils/misc';
87
import { IKernelProcess } from '../kernel-launcher/types';
98
import { IWebSocketLike } from '../kernelSocketWrapper';
109
import { IKernelSocket } from '../types';
@@ -107,9 +106,7 @@ export class RawKernel implements Kernel.IKernel {
107106

108107
public shutdown(): Promise<void> {
109108
suppressShutdownErrors(this.realKernel);
110-
return this.realKernel.shutdown().catch((_exc) => {
111-
noop();
112-
});
109+
return this.realKernel.shutdown().then(() => this.kernelProcess.dispose());
113110
}
114111
public getSpec(): Promise<Kernel.ISpecModel> {
115112
return this.realKernel.getSpec();

src/client/datascience/serviceRegistry.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ import { PlotViewer } from './plotting/plotViewer';
8181
import { PlotViewerProvider } from './plotting/plotViewerProvider';
8282
import { PreWarmActivatedJupyterEnvironmentVariables } from './preWarmVariables';
8383
import { ProgressReporter } from './progress/progressReporter';
84-
import { EnchannelJMPConnection } from './raw-kernel/enchannelJMPConnection';
8584
import { RawNotebookProviderWrapper } from './raw-kernel/rawNotebookProviderWrapper';
8685
import { StatusProvider } from './statusProvider';
8786
import { ThemeFinder } from './themeFinder';
@@ -103,7 +102,6 @@ import {
103102
IInteractiveWindow,
104103
IInteractiveWindowListener,
105104
IInteractiveWindowProvider,
106-
IJMPConnection,
107105
IJupyterCommandFactory,
108106
IJupyterDebugger,
109107
IJupyterExecution,
@@ -209,7 +207,6 @@ export function registerTypes(serviceManager: IServiceManager) {
209207
serviceManager.addSingleton<NativeEditorSynchronizer>(NativeEditorSynchronizer, NativeEditorSynchronizer);
210208
serviceManager.addSingleton<INotebookProvider>(INotebookProvider, NotebookProvider);
211209
serviceManager.addSingleton<IJupyterServerProvider>(IJupyterServerProvider, NotebookServerProvider);
212-
serviceManager.add<IJMPConnection>(IJMPConnection, EnchannelJMPConnection);
213210
serviceManager.addSingleton<IPyWidgetMessageDispatcherFactory>(IPyWidgetMessageDispatcherFactory, IPyWidgetMessageDispatcherFactory);
214211
serviceManager.addSingleton<IJupyterInterpreterDependencyManager>(IJupyterInterpreterDependencyManager, JupyterInterpreterSubCommandExecutionService);
215212
serviceManager.addSingleton<IJupyterSubCommandExecutionService>(IJupyterSubCommandExecutionService, JupyterInterpreterSubCommandExecutionService);

0 commit comments

Comments
 (0)