From 96c6d4f6ed6645928a91faa6c29e5584f55f1705 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Fri, 10 Apr 2020 14:43:55 -0700 Subject: [PATCH] Validate python when nb opened not on ext activate --- news/2 Fixes/10893.md | 1 + src/client/datascience/activation.ts | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 news/2 Fixes/10893.md diff --git a/news/2 Fixes/10893.md b/news/2 Fixes/10893.md new file mode 100644 index 000000000000..2c5f0d0820be --- /dev/null +++ b/news/2 Fixes/10893.md @@ -0,0 +1 @@ +Performa validation of interpreter only when a Notebook is opened instead of when extension activates. diff --git a/src/client/datascience/activation.ts b/src/client/datascience/activation.ts index 8b58c91c3853..b76a01b7ccba 100644 --- a/src/client/datascience/activation.ts +++ b/src/client/datascience/activation.ts @@ -28,8 +28,6 @@ export class Activation implements IExtensionSingleActivationService { public async activate(): Promise { this.disposables.push(this.notebookEditorProvider.onDidOpenNotebookEditor(this.onDidOpenNotebookEditor, this)); this.disposables.push(this.jupyterInterpreterService.onDidChangeInterpreter(this.onDidChangeInterpreter, this)); - // Warm up our selected interpreter for the extension - this.jupyterInterpreterService.setInitialInterpreter().ignoreErrors(); this.contextService.activate().ignoreErrors(); } @@ -37,10 +35,14 @@ export class Activation implements IExtensionSingleActivationService { this.notebookOpened = true; this.PreWarmDaemonPool().ignoreErrors(); sendTelemetryEvent(Telemetry.OpenNotebookAll); + // Warm up our selected interpreter for the extension + this.jupyterInterpreterService.setInitialInterpreter().ignoreErrors(); } private onDidChangeInterpreter() { if (this.notebookOpened) { + // Warm up our selected interpreter for the extension + this.jupyterInterpreterService.setInitialInterpreter().ignoreErrors(); this.PreWarmDaemonPool().ignoreErrors(); } }