microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.28k stars 28.57k forks source link

The overview ruler doesn't indicate selections when the Pylance extension is enabled #207212

Closed LeuschkeTressa closed 1 week ago

LeuschkeTressa commented 8 months ago

Type: Bug

Steps to reproduce:

Expected:

Actual:

As a consequence of the above, if invoking with code-insiders --disable-extensions the problem will not be present.

This problem bears resemblance to https://github.com/microsoft/vscode/issues/187120.

Screenshots

Expected <=> problem not present (Pylance disabled): CleanShot 2023-12-28 at 12 19 53

Actual <=> problem present (Pylance enabled): CleanShot 2023-12-28 at 12 21 48

Details

Problem is only present when (all of)

If the Pylance extension is first disabled and then enabled, the problem is only triggered after also doing Developer: Reload Window. To reproduce this:

Invoking with code-insiders --disable-gpu has no effect on the presence of the problem.

Note: the Haskell extension (haskell.haskell), which includes support for the Haskell LSP (language server), shows identical behaviour for Haskell files: when the Haskell LSP is started/enabled, no overview ruler selection indicators are shown.

Versions, system info

code-insiders --version
# 1.81.0-insider
# 6445d93c81ebe42c4cbd7a60712e0b17d9463e97
# arm64

code-insiders --list-extensions --show-versions \
| grep -E 'ms-python.*(python|pylance)'
# ms-python.python@2023.14.0
# ms-python.vscode-pylance@2023.12.1

uname -a
# Darwin ... 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:53:44 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T8103 arm64
addition 2024-03-03: still the same issue with the following later versions ```bash code-insiders --version # 1.88.0-insider # bb171489789c9a49e985a4a2c8694138d70d42c1 # arm64 code-insiders --list-extensions --show-versions \ | grep -E 'ms-python.*(python|pylance)' # ms-python.python@2024.2.1 # ms-python.vscode-pylance@2024.2.2 uname -a # Darwin ... 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:34 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8103 arm64 ```

[generated by issue reporter]:

Extension version: 2023.12.1 VS Code version: Code - Insiders 1.81.0-insider (Universal) (6445d93c81ebe42c4cbd7a60712e0b17d9463e97, 2023-08-02T12:33:35.295Z) OS version: Darwin arm64 22.5.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 (8 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|2, 2, 2| |Memory (System)|16.00GB (0.43GB free)| |Process Argv|. --crash-reporter-id fe54dafd-b26b-456a-946e-38dfeae593f7| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv695:30137379 vsins829:30139715 vsliv368cf:30146710 vsreu685:30147344 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256198 vslsvsres303:30308271 pythontb:30258533 pythonptprofiler:30281269 vsdfh931cf:30280410 vshan820:30294714 vscod805cf:30301675 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 py29gd2263:30784851 vsclangdf:30492506 c4g48928:30535728 dsvsc012:30540252 showlangstatbar:30737417 fixshowwlkth:30771523 showindicator:30805243 pythongtdpath:30726887 i26e3531:30792625 welcomedialog:30812478 pythonidxpt:30768918 pythonnoceb:30776497 asynctok:30898717 dsvsc013:30777762 dsvsc014:30777825 pythonmpswarning:30901777 dsvsc015:30821418 pythontestfixt:30866404 pythonregdiag2:30926734 pyreplss1:30879911 pythonmypyd1:30859725 pythoncet0:30859736 pythontbext0:30879054 accentitlementst:30870582 dsvsc016:30879898 dsvsc017:30880771 dsvsc018:30880772 aa_t_chat:30882232 cp7184t:30925682 ```
LeuschkeTressa commented 6 months ago

I just updated the issue with the following additional info:

rchiodo commented 6 months ago

Given that it happens with Pylance, Jedi, and Haskell, this is likely a problem in VS code and not something that Pylance is causing.

LeuschkeTressa commented 6 months ago

@rchiodo Yes.

Perhaps a moderator could move this issue to https://github.com/microsoft/vscode (from https://github.com/microsoft/pylance-release where it is now)?


The same issue was reported as https://github.com/microsoft/pylance-release/issues/5320 (now closed as a duplicate of this). The reporter's experience was that this problem appeared in the second half of December of 2023; probably through some VS Code update. That timing is in line with when I think the problem appeared for me.

debonte commented 6 months ago

@luabud, could you please transfer this to vscode?

alexdima commented 2 months ago

When a rich language is present which can do semantic highlights, we don't do selection highlights in the overview ruler. This is done here: https://github.com/microsoft/vscode/blob/0a417782b1781d39803b8f1791cfb22f8835ddae/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.ts#L96-L99

VSCodeTriageBot commented 2 months ago

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vs-code-engineering[bot] commented 2 weeks ago

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

LeuschkeTressa commented 2 weeks ago

I'd question removing the bug tag from this issue (by @luabud in March). It is currently tagged as feature-request. I suggest changing that back to bug.

@alexdima described that for languages with semantic highlighting, selection highlights in the overview ruler will not be present, and referenced this condition in the source code (https://github.com/microsoft/vscode/issues/207212#issuecomment-2163971036).

In my view, this behaviour must be seen as a bug. If there is a fundamental reason why it doesn't make sense to show the ruler selection highlights for such languages, that fact should at least be documented.

(Note that this issue was also reported by another user in https://github.com/microsoft/pylance-release/issues/5320, now closed as a duplicate of this issue.)

vs-code-engineering[bot] commented 1 week ago

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

jacobcassidy commented 1 week ago

This issue breaks the default VSCode workflow, so I agree with @LeuschkeTressa that it is a bug that should be fixed, not a feature request.

LeuschkeTressa commented 1 week ago

@luabud @alexdima this issue was auto-closed by the bot due to (my understanding:) being tagged "feature request" + some other conditions - would you consider re-opening the issue, and change the tagging to "bug"?