-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support mapping cells to hash/execution counts #6338
Conversation
break; | ||
|
||
case InteractiveWindowMessages.RestartKernel: | ||
this.hashes.clear(); |
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.
Is this just to be safe? We add sys into on a restart so that should already be clearing this. #Resolved
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.
True. I had just this originally and then added the sysinfo ones. Might be better to remove it as future people would wonder why it's necessary.
In reply to: 298242465 [](ancestors = 298242465)
} | ||
|
||
public getHashes(): IFileHashes[] { | ||
return [...this.hashes.entries()].map(e => { |
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.
e [](start = 46, length = 1)
I think changing this to ([key, value]) makes the rest of the code clearer as you can skip the [0] and [1] s and just use key and value. Or change value to hashArray or something like that. #WontFix
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.
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.
private onAboutToAddCode(args: IRemoteAddCode) { | ||
// Make sure this is valid | ||
if (args && args.code && args.line !== undefined && args.file) { | ||
// First make sure not a markdown cell. Those can be ignored. Just get out the first code cell |
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.
Just get out the first code cell [](start = 74, length = 32)
Do we ever add multiple code cells in a call of this? If so do we just ignore the next code cells in the call? #ByDesign
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 this is just the case where the user has a markdown cell with code in it. There will only ever be at most a single cell.
In reply to: 298252462 [](ancestors = 298252462)
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.
Maybe I should put a comment to that effect though.
In reply to: 298254091 [](ancestors = 298254091,298252462)
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.
Actually no that's wrong. RunSelectionOrLine could theoretically span multiple cells.
In reply to: 298254188 [](ancestors = 298254188,298254091,298252462)
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.
Ah actually what that does is send the all the cells in one big chunk. Makes sense. The user said to run the entire selection as one cell.
In reply to: 298255279 [](ancestors = 298255279,298254188,298254091,298252462)
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.
Do the run entire file commands do the same thing? That was the one that I was initially thinking of.
In reply to: 298261612 [](ancestors = 298261612,298255279,298254188,298254091,298252462)
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.
Yeah they either split the file into cells or send the entire thing in one chunk. This would still only generate at most a single code cell.
In reply to: 298262026 [](ancestors = 298262026,298261612,298255279,298254188,298254091,298252462)
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.
For #6318
package-lock.json
has been regenerated by runningnpm install
(if dependencies have changed)