Skip to content
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

Restarting IW retains value for __file__ #7897

Merged
merged 5 commits into from
Oct 12, 2021
Merged

Restarting IW retains value for __file__ #7897

merged 5 commits into from
Oct 12, 2021

Conversation

DonJayamanne
Copy link
Contributor

For #7883

@DonJayamanne DonJayamanne requested a review from a team as a code owner October 11, 2021 23:36
return undefined;
}

protected get kernelConnection(): Readonly<KernelConnectionMetadata> | undefined {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead code

}

protected async setFileInKernel(file: string, kernel: IKernel): Promise<void> {
private async setFileInKernel(file: string, kernel: IKernel): Promise<void> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Protected led me to believe this was used elsewhere, but it wasn't

@@ -182,6 +174,14 @@ export class InteractiveWindow implements IInteractiveWindowLoadable {
controller: controller!.controller,
resourceUri: this.owner
});
kernel.onRestarted(
async () => {
Copy link
Contributor Author

@DonJayamanne DonJayamanne Oct 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was missing, this is the fix

@@ -467,17 +459,21 @@ export class InteractiveWindow implements IInteractiveWindowLoadable {
}
return result;
}
private async runIntialization(kernel: IKernel) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be run when restarting

@codecov-commenter
Copy link

codecov-commenter commented Oct 12, 2021

Codecov Report

Merging #7897 (36a7012) into main (e66061c) will increase coverage by 0%.
The diff coverage is 78%.

@@          Coverage Diff          @@
##            main   #7897   +/-   ##
=====================================
  Coverage     70%     70%           
=====================================
  Files        361     361           
  Lines      22153   22134   -19     
  Branches    3357    3356    -1     
=====================================
+ Hits       15583   15617   +34     
+ Misses      5211    5163   -48     
+ Partials    1359    1354    -5     
Impacted Files Coverage Δ
...atascience/interactive-window/interactiveWindow.ts 59% <78%> (+4%) ⬆️
...lient/datascience/kernel-launcher/kernelProcess.ts 74% <0%> (ø)
src/client/datascience/jupyter/kernels/helpers.ts 71% <0%> (+<1%) ⬆️
...lient/datascience/jupyter/kernels/cellExecution.ts 77% <0%> (+<1%) ⬆️
src/client/datascience/baseJupyterSession.ts 69% <0%> (+<1%) ⬆️
...tascience/jupyter/kernels/kernelCommandListener.ts 57% <0%> (+<1%) ⬆️
...ent/datascience/jupyter/kernels/kernelExecution.ts 69% <0%> (+<1%) ⬆️
...c/client/datascience/variablesView/variableView.ts 87% <0%> (+1%) ⬆️
...client/datascience/kernel-launcher/kernelDaemon.ts 57% <0%> (+1%) ⬆️
...ractive-window/interactiveWindowCommandListener.ts 32% <0%> (+2%) ⬆️
... and 3 more

@DonJayamanne DonJayamanne merged commit 2a624c3 into main Oct 12, 2021
@DonJayamanne DonJayamanne deleted the issue7883 branch October 12, 2021 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants