-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-run initialization when changing kernels in iw #7948
Conversation
const kernel = this.kernelProvider.getOrCreate(editor.document, { | ||
metadata: controller!.connection, | ||
controller: controller!.controller, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some cleanup
const notebookEditor = await this._editorReadyPromise; | ||
const kernel = await this._kernelReadyPromise; | ||
await this.updateOwners(fileUri); | ||
const [notebookEditor, kernel] = await Promise.all([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parallelize, should be a little faster
this.internalDisposables.push(kernel); | ||
await kernel.start(); | ||
this.fileInKernel = undefined; | ||
await this.runIntialization(kernel, this.owner); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved initialization scripts to after kernel is created/started.
This way it happens everytime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also passing the owner
Codecov Report
@@ Coverage Diff @@
## main #7948 +/- ##
=====================================
Coverage 70% 70%
=====================================
Files 364 364
Lines 22427 22424 -3
Branches 3416 3416
=====================================
- Hits 15882 15880 -2
+ Misses 5171 5156 -15
- Partials 1374 1388 +14
|
For #7941
Changing controllers doesn't re-run the initialization scripts in interactive window