Repository navigation
Better handling of notebook diagnostics - #16529
Merged
Merged
Conversation
|
|
||
| private onDidChangeCellsEmitter = new EventEmitter<TextDocumentChangeEvent>(); | ||
|
|
||
| private mapOfConcatDocumentsWithCellUris = new Map<string, string[]>(); |
There was a problem hiding this comment.
Storing the Uris as strings (don't want to be storing the objects)
| const currentCellUris = new Set(cellUris); | ||
| oldCellUris | ||
| .filter((cellUri) => !currentCellUris.has(cellUri)) | ||
| .forEach((cellUri) => result.set(Uri.parse(cellUri), [])); |
There was a problem hiding this comment.
Without this, if we delete a cell, the diagnostics of deleted cells remains & doesn't go away.
| } else if (this.mapOfConcatDocumentsWithCellUris.has(uri.toString())) { | ||
| (this.mapOfConcatDocumentsWithCellUris.get(uri.toString()) || []) | ||
| .map((cellUri) => Uri.parse(cellUri)) | ||
| .forEach((cellUri) => result.set(cellUri, [])); |
There was a problem hiding this comment.
Without this, if a notebook is closed, the diagnostics don't go away.
This is because when a notebook is closed, the wrapper is disposed and we don't have the wrapper document, hence we cannot get the cells to clear the diagnostics.
Don Jayamanne (DonJayamanne)
marked this pull request as ready for review
June 21, 2021 19:34
github-actions
Bot
requested review from
Kim-Adeline Miguel (kimadeline) and
Paula (paulacamargo25)
June 21, 2021 19:35
Karthik Nadig (karthiknadig)
approved these changes
Jun 21, 2021
Rich Chiodo (rchiodo)
approved these changes
Jun 21, 2021
Joyce Er (joyceerhl)
approved these changes
Jun 21, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes some long standing issues in microsoft/vscode-jupyter#5161