Skip to content

Never update cell contents from the extension side - #8325

Merged
Rich Chiodo (rchiodo) merged 1 commit into
masterfrom
rchiodo/delete_source
Nov 1, 2019
Merged

Rich Chiodo (rchiodo) merged 1 commit into
masterfrom
rchiodo/delete_source

Conversation

@rchiodo

Copy link
Copy Markdown

For #8215

I cannot repro this bug, but the code looks like it might be possible to cause an update. A cell would have to be in the error state when the user typed and executing would have to immediately cause an error. In this situation, the typing that occurred after execution would be lost.

Anyway there's no reason to ever update the source of a cell unless

  • We get liveshare to work
  • We let the interactive window update cells after running them

// If cell state changes, then update just the state and the cell data (excluding source).
// Prevent updates to the source, as its possible we have recieved a response for a cell execution
// and the user has updated the cell text since then.
if (this.pendingState.cellVMs[index].cell.state !== cell.state) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm a bit confused as to why it was the way it was before. If state was the same we did want to update source?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hmm. Not sure why. Maybe for live share? You'd get an update as the user typed?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, maybe that was it. I think we commented out part of the lines above when we disabled live share, but not this part. In any case seems good now.


In reply to: 341397570 [](ancestors = 341397570)

@IanMatthewHuff Ian Huff (IanMatthewHuff) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

:shipit:

@codecov-io

Codecov (codecov-io) commented Oct 31, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #8325 into master will increase coverage by 0.35%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8325      +/-   ##
==========================================
+ Coverage   58.66%   59.01%   +0.35%     
==========================================
  Files         505      505              
  Lines       22778    23147     +369     
  Branches     3740     3740              
==========================================
+ Hits        13363    13661     +298     
- Misses       8522     8593      +71     
  Partials      893      893
Impacted Files Coverage Δ
src/client/testing/serviceRegistry.ts 48.64% <0%> (-44.21%) ⬇️
...t/datascience/jupyter/jupyterDataRateLimitError.ts 66.66% <0%> (-33.34%) ⬇️
src/client/formatters/serviceRegistry.ts 75% <0%> (-25%) ⬇️
...ience/jupyter/jupyterDebuggerRemoteNotSupported.ts 75% <0%> (-25%) ⬇️
src/client/common/utils/icons.ts 83.33% <0%> (-16.67%) ⬇️
src/client/testing/codeLenses/main.ts 44.44% <0%> (-15.56%) ⬇️
src/client/api.ts 78.57% <0%> (-11.43%) ⬇️
src/client/common/utils/version.ts 77.77% <0%> (-1.39%) ⬇️
src/client/providers/providerUtilities.ts 83.33% <0%> (-1.29%) ⬇️
...lient/datascience/jupyter/jupyterSelfCertsError.ts 100% <0%> (ø) ⬆️
... and 28 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0774fb8...8a39e0e. Read the comment docs.

@rchiodo
Rich Chiodo (rchiodo) merged commit 9382959 into master Nov 1, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Nov 8, 2019
@rchiodo
Rich Chiodo (rchiodo) deleted the rchiodo/delete_source branch November 11, 2019 17:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants