pylance-release icon indicating copy to clipboard operation
pylance-release copied to clipboard

Notebook colorizing does not show on reload

Open judej opened this issue 2 years ago • 5 comments

Environment data

[Info - 10:23:05 AM] (53292) Pylance language server 2022.6.0 (pyright c6e1d8dd) starting [Info - 10:23:05 AM] (53292) Server root directory: c:\Users\judej.vscode-insiders\extensions\ms-python.vscode-pylance-2022.6.0\dist Notebook support: LSP

Code Snippet

Animation

Repro Steps

This repros on Legacy and LSP notebook support. After reloading the window, the colors do not appear until I edit the file and trigger a completion as the GIF shows

Expected behavior

The colors should light up on reload

Logs

The following log entry shows up when I start typing: (43764) [BG(2)] getSemanticTokens full at c:\Users\judej\source\scratch\pd1\test.ipynb:pylance-notebook-cell:ch0000000 (1ms)

judej avatar Jun 08 '22 17:06 judej

Are these related? https://github.com/microsoft/pylance-release/issues/2837

judej avatar Jun 08 '22 22:06 judej

adding this to my settings.json

  "python.trace.server": "verbose",

hmm. strange. We seem to be returning a response, but no color update is happening.

[Trace - 2:24:58 PM] Received response 'textDocument/semanticTokens/range - (3)' in 1684ms.
Result: {
    "resultId": "1654809898124",
    "data": [
        0,
        7,
        5,
        16,
        0,
        0,
        9,
        2,
        16,
        0,
        2,
        0,
        1,
        14,
        1,
        0,
        4,
        2,
        16,
        0,
        0,
        3,
        6,
        16,
        0,
        0,
        7,
        7,
        13,
        0
    ]
}

bschnurr avatar Jun 09 '22 21:06 bschnurr

full log

missingSemanticTokens.txt

with "python.pylanceLspNotebooksEnabled": true,

I only see this bug with pylanceLspNotebooksEnabled = true.

[Trace - 2:24:57 PM] Received response 'textDocument/semanticTokens/full - (1)' in 1600ms.
Result: {
    "data": []
}

bschnurr avatar Jun 09 '22 21:06 bschnurr

Not sure why full tokens is empty

bschnurr avatar Jun 09 '22 21:06 bschnurr

@bschnurr, if you can repro this, could you try reproing with this extra logging that I created for Rich? https://github.com/debonte/pyrx/commit/e97106d778367d1835812ba9bb78d1bfe2f1aa33

The issue stopped reproing for him when I gave him this change and I've never been able to repro it.

debonte avatar Jun 09 '22 21:06 debonte

This issue has been fixed in version 2022.8.51, which we've just released. You can find the changelog here: CHANGELOG.md

bschnurr avatar Sep 01 '22 21:09 bschnurr