Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Validate python when nb opened not on ext activate
  • Loading branch information
DonJayamanne committed Apr 10, 2020
commit 96c6d4f6ed6645928a91faa6c29e5584f55f1705
1 change: 1 addition & 0 deletions news/2 Fixes/10893.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Performa validation of interpreter only when a Notebook is opened instead of when extension activates.
6 changes: 4 additions & 2 deletions src/client/datascience/activation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,21 @@ export class Activation implements IExtensionSingleActivationService {
public async activate(): Promise<void> {
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();
}

private onDidOpenNotebookEditor(_: INotebookEditor) {
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();
}
}
Expand Down