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

Polyglot Notebook: [DevExE2E][Regression] The execution results of javascript code are shown redundancy. #2979

Open
15 tasks
v-hozha1 opened this issue May 10, 2023 · 8 comments

Comments

@v-hozha1
Copy link

Describe the bug

Using extension Polyglot Notebook in VS Code insider.
The execution results of javascript code are shown redundancy.

Detailed Repro Build info: VSCodeSetup-arm64-1.79.0-insider + dotnet-interactive-vscode-1.0.4259021.vsix
VSCode Link: https://code.visualstudio.com/insiders/#
Version: 1.79.0-insider (system setup)
Commit: a7133ae9e21e01ed204b02e17e8fc3e91dcadae7
Date: 2023-05-09T09:49:38.022Z
Electron: 22.5.1
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT arm64 10.0.25331
Sandboxed: Yes

dotnet-interactive-vscode-1.0.4259021.vsix
https://dev.azure.com/dnceng/internal/_build/results?buildId=2177104&view=artifacts&pathAsName=false&type=publishedArtifacts

sdk info: dotnet-sdk-7.0.203-win-arm64

Note:
1.It's a regression issue. It doesn't repro on VSCodeUserSetup-x64-1.78.1 + dotnet-interactive-vscode-1.0.4259021.vsix.
2.Repro VM: 172.20.30.176

Steps:

  1. Start with an empty text file open in VSCode
    2.Ctrl+Shift+P => "Polyglot Notebook: Create new blank notebook"
    3.Select "Create as .dib" ->Select "C#" -> Specify the code in cell-> execution
    var x=123;
  2. Add a new code cell below as html. -> Specify the code in cell-> execution
    The value is not yet set.
  3. Add a new code cell below as javascript. -> Specify the code in cell-> execution
    #!share --from csharp x
    document.getElementById("output").innerText = The value is ${x}.;
    console.log(The value is ${x}.);

Expected Results:
The Output show "The value is 123".
image

Actual Results:
The execution results of javascript code are shown redundancy.
image
ReproOutput

Please complete the following:

Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):

  • OS
    • [ √] Windows 11
    • Windows 10
    • macOS
    • Linux (Please specify distro)
    • iOS
    • Android
  • Browser
    • Chrome
    • Edge
    • Firefox
    • Safari
  • Frontend
    • Jupyter Notebook
    • Jupyter Lab
    • nteract
    • Visual Studio Code
    • [ √] Visual Studio Code Insiders
    • Visual Studio
    • Other (please specify)
@colombod
Copy link
Member

@DonJayamanne this doesn't happen in stable. the .NET Interactive binaries are the same at this moment since we have not pushed out a new insiders release yet. What are your thoughts?

@DonJayamanne
Copy link
Contributor

As far as I know, no changes were made in VS Code either
Please can you check the dib file and see how many output items there are, i.e. is The value is 123 duplicated in the dib file (after saving).

@colombod
Copy link
Member

Dib doesn't persist output

@jonsequitur
Copy link
Contributor

I've seen this behavior before and I don't believe it's a regression. I can't repro it until doing Split right at which point there are two different web views and JavaScript kernel instances for a single document, both listening to the same messages. I believe this is why this happens.

The repro is trivial:

image

Another listener to the JavaScript console is added each time you do a Split right:

image

Closing the other panes does not unhook the listeners and the redundant output will continue to be seen until the kernel is restarted.

@colombod
Copy link
Member

colombod commented Jun 8, 2023

Is this still reproducing, we had a new release of both PolyglotNotebook and VScode

@v-hozha1
Copy link
Author

v-hozha1 commented Jun 9, 2023

@colombod This issue still repro on VSCodeSetup-x64-1.79.0 +dotnet-interactive-vscode-1.0.4308021.vsix.
Build link: https://code.visualstudio.com/download + https://dev.azure.com/dnceng/internal/_build/results?buildId=2196448&view=artifacts&pathAsName=false&type=publishedArtifacts

Repro VM: 172.16.195.16
image

@v-hozha1
Copy link
Author

@colombod This issue only repro in split view. It doesn't repro when using a single view.

@v-hozha1
Copy link
Author

This issue still repro on VS Code 1.93.1 + dotnet-interactive-vscode-1.0.5468011.vsix + dotnet-sdk-8.0.401-win-x64 as split view.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants