Skip to content
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

Running cells in quick succession doesn't behave as expected #6982

Closed
greazer opened this issue Aug 6, 2021 · 7 comments
Closed

Running cells in quick succession doesn't behave as expected #6982

greazer opened this issue Aug 6, 2021 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug interactive-window Impacts interactive window verified Verification succeeded
Milestone

Comments

@greazer
Copy link
Member

greazer commented Aug 6, 2021

Version: 1.60.0-insider (user setup)
Commit: a4eb4d688477fb9f2176bb2ed932b0b1726caed3
Date: 2021-08-05T21:34:13.867Z (2 hrs ago)
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Windows_NT x64 10.0.22000

  1. Take a script that looks like this:
#%%
a = 1

#%%
b = a + 1

#%%
a = a + 1
  1. Click Run Below 3 times in quick succession
  2. Inspect the value of a.

Actual
image

Expected
'a' should be 2, right?

The reason this is the case can be seen in the execution history of the Interactive window:
image

I would have expected the history to show 3 consecutive copies of the 3 cells in the script running. Rather than each cell being run 3 times in a row.

This may seem contrived, but I ran into it by accident and I suspect that real situations could arise where things get goofed up and the user doesn't realize it.

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Oct 18, 2021

Moving to triage, as i think this is a important and golden scenario issue. (basically pretty bad bug)

@greazer greazer added the important Issue identified as high-priority label Oct 29, 2021
@greazer greazer added this to the November 2021 milestone Oct 29, 2021
@greazer greazer removed the important Issue identified as high-priority label Nov 8, 2021
@greazer
Copy link
Member Author

greazer commented Nov 8, 2021

Try to repro. May be fixed

@greazer greazer closed this as completed Nov 8, 2021
@rchiodo
Copy link
Contributor

rchiodo commented Nov 8, 2021

Still repros but only on first open. If the window is already open, then it behaves as expected.

@rchiodo rchiodo reopened this Nov 8, 2021
@rchiodo
Copy link
Contributor

rchiodo commented Nov 8, 2021

Also you have to click the link 3 times. If you click it once it works fine.

@greazer
Copy link
Member Author

greazer commented Nov 8, 2021

I can repro all the time.

@IanMatthewHuff
Copy link
Member

Verification is pretty easy here. Just create a .py file with a few cell markers defined. In each cell just do a small timing loop to burn a second or two of time. Then trigger something like Run Below from the top code lens twice. In the old code you would get Cell A, Cell A, Cell B, Cell B, Cell C, Cell C. Now we get each command handled in order, so Cell A, Cell B, Cell C, Cell A, Cell B, Cell C.

@rchiodo rchiodo added the verified Verification succeeded label Dec 3, 2021
@rchiodo
Copy link
Contributor

rchiodo commented Dec 3, 2021

/verified

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug interactive-window Impacts interactive window verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants