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

🐛 Biome not properly formatting workspace files #410

Open
3 tasks
jason-slash opened this issue Oct 21, 2024 · 3 comments
Open
3 tasks

🐛 Biome not properly formatting workspace files #410

jason-slash opened this issue Oct 21, 2024 · 3 comments
Labels
Stable Triage Waiting for response Waiting for a response from the author of the issue

Comments

@jason-slash
Copy link

VS Code version

1.93.1

Extension version

2.3.0

Biome version

1.9.3

Operating system

  • Windows
  • macOS
  • Linux

Description

Our team has been struggling with Biome inconsistently formatting workspace files. On save, sometimes it uses the default biome settings, and sometimes it uses our biome.json settings. In addition, when pressing Ctrl + Shift + P, we are able to see a bunch of Biome formatters, which did not seem to be the case in previous versions.

image

Occasionally, restarting VSCode or closing out of the current file and reopening seems to fix it, but not consistently as well.

Steps to reproduce

  1. Attempt to format a file (potentially in a large monorepo which has biome.json's that depend on each other, but may be unrelated)
  2. See that the formatting is inconsistent.

Expected behavior

The formatting was consistent in Biome 1.7.0, but after we updated to 1.9.3, the formatting has not been consistent at all.

Does this issue occur when using the CLI directly?

Not sure / Not applicable

Link to a minimal reproduction

No response

Logs

No response

@nhedger
Copy link
Member

nhedger commented Dec 1, 2024

Would you mind trying the pre-release of the extension to see if it solves it for you? The current version has a couple of issues with regards to sockets that sometimes results in multiple session being created.

@nhedger nhedger added Waiting for response Waiting for a response from the author of the issue Stable labels Dec 1, 2024
@arthuracs
Copy link

arthuracs commented Dec 19, 2024

I'm experiencing the same issues in large workspaces (both on release and pre-release versions):

  • The folder configuration is sometimes not picked up at all from the start, and a default config is used.
  • The extension sometimes initially picks up on the correct folder configuration, but then seems to forget it later on and uses a default configuration.
  • It also sometimes lists multiple formatters in the command palette.
  • Sometimes files are ignored entirely with The file [file path] was ignored..
  • The same monorepos work fine in Webstorm with biome, as well as via the cli.

Overall, this makes the vscode extension very difficult to use in monorepos as the output becomes unpredictable.

@hyoretsu
Copy link

hyoretsu commented Dec 26, 2024

Edit: they all seem to be related to projects in a workspace without Biome crashing the extension. It's sort of expected on a single project, but quite on a possibly multi-language workspace.

I had similar problems with workspaces but was showered with errors when switched to pre release:

image

internalError/io ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  × Errors occurred while executing I/O operations.
    
    Caused by:
      Access is denied. (os error 5)
2024-12-26 10:51:21.085 [info] [Error - 10:51:20 AM] Biome language server error
2024-12-26 10:51:21.085 [info] [Error - 10:51:20 AM] Stopping server failed
2024-12-26 10:51:21.085 [info] Error: Client is not running and can't be stopped. It's current state is: starting
    at BiomeLanguageClient.shutdown (c:\Users\hyore\.vscode\extensions\biomejs.biome-2024.12.22126\out\index.js:50368:21)
    at BiomeLanguageClient.stop (c:\Users\hyore\.vscode\extensions\biomejs.biome-2024.12.22126\out\index.js:50339:23)
    at BiomeLanguageClient.stop (c:\Users\hyore\.vscode\extensions\biomejs.biome-2024.12.22126\out\index.js:51249:24)
    at BiomeLanguageClient.handleConnectionError (c:\Users\hyore\.vscode\extensions\biomejs.biome-2024.12.22126\out\index.js:50600:20)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-12-26 10:51:21.085 [info] [Error - 10:51:20 AM] biome client: couldn't create connection to server.
2024-12-26 10:51:21.085 [info]   Message: write EPIPE
  Code: -32099 
2024-12-26 10:51:21.085 [info] error: could not find bin metadata file

Bun failed to remap this bin to its proper location within node_modules.
This is an indication of a corrupted node_modules directory.

Please run 'bun install --force' in the project root and try
it again. If this message persists, please open an issue:
https://github.com/oven-sh/bun/issues


2024-12-26 10:51:21.085 [info] [Error - 10:51:20 AM] Biome language server closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stable Triage Waiting for response Waiting for a response from the author of the issue
Projects
None yet
Development

No branches or pull requests

4 participants