biomejs / biome-vscode

Biome extension for Visual Studio Code and VSCodium
https://marketplace.visualstudio.com/items?itemName=biomejs.biome
Apache License 2.0
235 stars 32 forks source link

🐛 Extension searches for binary and suggests download even if disabled #375

Closed tschaub closed 1 month ago

tschaub commented 1 month ago

VS Code version

1.93.1

Extension version

v2024.10.20458 (pre-release)

Biome version

none

Operating system

Description

I have disabled the Biome extension in my VS Code user settings (hoping I would have fewer problems if it were only enabled in specific workspaces).

{
  "biome.enabled": false
}

When I open a *.js file, I see this dialog:

image

I didn't expect the extension to do anything if it was not enabled.

Steps to reproduce

  1. Install the latest pre-release of the extension
  2. Open user setttings.json and attempt to disable the extension with "biome.enabled": false
  3. Open a JavaScript file
  4. See the extension open a dialog suggesting to download and globally install Biome

Expected behavior

I only want Biome to run in projects that are configured with a biome.json and have Biome as a dependency. I never expect the extension to have an impact or Biome to run when the extension is disabled. So I expected nothing to happen when I opened a JS file with the extension disabled.

I was hoping that the "biome.searchInPath": false setting would keep the extension for looking for an executable outside of the project's dependencies, but I get a warning that this setting has been deprecated.

I also tried setting "biome.requireConfigFile": true in hopes that the extension would do nothing if a biome.json configuration file was not found in a workspace. With this setting I still get the dialog above when opening a JS file.

Does this issue occur when using the CLI directly?

Not sure / Not applicable

Link to a minimal reproduction

No response

Logs

2024-10-03 14:53:56.890 [info] Biome extension 2024.10.20458 activated
2024-10-03 14:53:56.890 [info] Biome extension started
2024-10-03 14:53:56.890 [info] User-facing commands registered
2024-10-03 14:53:56.890 [info] Started listening for lockfile changes
2024-10-03 14:53:56.890 [info] Started listening for configuration changes
2024-10-03 14:53:56.890 [info] Started listening for active text editor changes
2024-10-03 14:54:38.585 [error] Could not find the Biome binary
2024-10-03 14:54:38.585 [info] Created a global LSP session
nhedger commented 1 month ago

Thanks for reporting this @tschaub.

The global session shouldn't indeed be created when the extension is disabled globally. A fix for this is on the way and will be published shortly.