microsoft / microsoft/vscode-black-formatter

Do not show commands when extension is not activated

Open
#514 2 comments 0 reactions 0 assignees View on GitHub
bug good first issue
Dominant language
Python
Stars
196
Forks
49
Avg merge
1d 5h
Merged PRs (30d)
7

Description

Type: Bug

Repro:

1. Have an instance of vscode where the "Black formatter" extension is not activated
2. Open command palette and search "black formatter: restart server" -- :bug: you can see the command even when the extension is not activated, hence should not be possible to invoke, especially "restarting the server" seems irrelevant when the extension is not activated

Extension version: 2024.3.11371020
VS Code version: Code - Insiders 1.90.0-insider (81c89c4d00663e1718871bab2f9bf2064a060b63, 2024-05-22T09:32:08.138Z)
OS version: Darwin arm64 23.4.0
Modes:

System Info

|Item|Value|
|---|---|
|CPUs|Apple M1 Pro (8 x 2400)|
|GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled|
|Load (avg)|7, 6, 8|
|Memory (System)|32.00GB (0.07GB free)|
|Process Argv|--log github.vscode-pull-request-github=debug --crash-reporter-id 3184aec0-4b31-4764-bfb0-162155975430|
|Screen Reader|no|
|VM|0%|

A/B Experiments

```
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
vsaa593cf:30376535
py29gd2263:31024238
c4g48928:30535728
vscrp:30624060
962ge761:30841072
pythongtdpath:30726887
welcomedialog:30812478
pythonidxpt:30768918
pythonnoceb:30776497
asynctok:30898717
dsvsc013:30777762
dsvsc014:30777825
dsvsc015:30821418
pythontestfixt:30866404
pythonregdiag2:30926734
pythonmypyd1:30859725
pythoncet0:30859736
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30870582
dsvsc016:30879898
dsvsc017:30880771
dsvsc018:30880772
cppperfnew:30980852
pythonait:30973460
showvideot:31016890
chatpanelt:31014475
01bff139:31013167
a69g1124:31018687
dvdeprecation:31040973
pythonprt:31036556
dwnewjupytercf:31046870
nb_pri_only:31052048
26j00206:31048877

```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in VS Code using the command palette while the Black formatter extension is inactive. Trace how the “Black Formatter: Restart Server” command becomes visible in that state, then verify that the command is absent when the extension is not activated and still available when it is active.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.