-
Notifications
You must be signed in to change notification settings - Fork 297
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
Display Kernel startup Errors in cell output for more visibility #8304
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8304 +/- ##
======================================
Coverage 72% 72%
======================================
Files 371 372 +1
Lines 23075 23193 +118
Branches 3512 3542 +30
======================================
+ Hits 16649 16743 +94
- Misses 4985 4996 +11
- Partials 1441 1454 +13
|
@inject(IApplicationShell) private readonly applicationShell: IApplicationShell | ||
) {} | ||
|
||
activate(): void { |
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 out of interactive window class, this is not specific to just interactive window anymore.
errorMessage = errorMessage.replace(matches[0], `<a href='${matches[2]}'>${matches[1]}</a>`); | ||
} | ||
} | ||
const execution = controller.controller.createNotebookCellExecution(cellToDisplayErrors); |
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 know this is how the API works, just feels odd that we have to do all this just to change the output. Though I guess it does ensure that everything runs through the execution control path.
// Then display the error in the cell. | ||
const stopWatch = new StopWatch(); | ||
while (stopWatch.elapsedTime <= 1_000 && associatedkernel.hasPendingCells) { | ||
await sleep(100); |
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.
Would it make sense to interrupt the current execution instead?
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.
No, it will stop. The existing code will still the execution.
The problem is this code gets called just when kernel dies, hence the cells are stored after that, within a few Ms.
Hence the max delay of 1s.
I wish the api allowed us to update cell output without all of this api. But these are a few exceptions
For #7902
For #8351