-
Notifications
You must be signed in to change notification settings - Fork 294
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
Remote 'kernelCommandListener' as it really listens to notebooks #10369
Conversation
Commands.NotebookEditorInterruptKernel, | ||
(context?: { notebookEditor: { notebookUri: Uri } } | Uri) => { | ||
if (context && 'notebookEditor' in context) { | ||
void this.interruptKernel(context?.notebookEditor?.notebookUri); |
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.
Please can you swallow the promise rejections using .ignoreErrors
or .catch(noop)
as follows:
this.interruptKernel(context?.notebookEditor?.notebookUri).catch(noop);
// or
this.interruptKernel(context?.notebookEditor?.notebookUri).ignoreErrors();
Using void
doesn't really handle the errors, hence if something fails we get errors logged by node.js about unhandled errors and this causes a few issues when debugging and the like.
Will mention at standup today.
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.
Sure. This was already there, but I can fix it.
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.
We should add a linter rule.
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.
Or I can just search for 'void this' everywhere and fix it.
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.
I've got a PR for that, will mention in standup.
@DonJayamanne did you have any more feedback? |
Not sure why i didn't approve, sorry |
For #10152
Another step in the removal of the 'notebook' references in kernels. The KernelCommandListener class was really listening to commands on notebooks so I just moved it.