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

🐛 Crash when 'insert_final_newline' is set to false in .editorconfig #443

Open
1 of 3 tasks
lsagetlethias opened this issue Dec 11, 2024 · 0 comments
Open
1 of 3 tasks
Labels

Comments

@lsagetlethias
Copy link

VS Code version

1.95.3

Extension version

2.3.0 & v2024.12.22126

Biome version

1.9.4

Operating system

  • Windows
  • macOS
  • Linux

Description

On a empty project inited with biome init, when a .editorconfig have the property insert_final_newline = false, the extension crash when "useEditorconfig" is set to true.

I end up discovering this issue while running biome check . manually.

Steps to reproduce

  • Create an empty project on vscode with the biome extension (stable or prerelease)
  • install biome with recommended command
  • run biome init
  • add .editorconfig file with insert_final_newline = false
  • add formatter.useEditorconfig: true in biome.json file

Restart the extension or the developer window.

Expected behavior

Even if the "insert_final_newline" property is overwritten or not used, the extension should not crash.

Does this issue occur when using the CLI directly?

No

Link to a minimal reproduction

No response

Logs

CLI:
  Version:                      1.9.4
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v22.11.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/1.22.22"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    true
  VCS disabled:                 true

Workspace:
  Open Documents:               0

Discovering running Biome servers...

Server:
  Status:                       stopped

----
(from Biome output panel in vscode)
[cli-stdout] data 73
[cli] exit 0
Connecting to "/Users/xxx/Library/Caches/dev.biomejs.biome/biome-socket-1.9.4" ...
[cli-stderr] data 393
[cli-stdout] end
[cli-stdout] finish
[Error - 11:19:54] Sending document notification textDocument/didOpen failed
Error: This socket has been ended by the other party
    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at Socket.writeAfterFIN [as write] (node:net:562:14)
    at /Users/xxx/.vscode/extensions/biomejs.biome-2.3.0/out/main.js:3008:25
    at new Promise (<anonymous>)
    at WritableStreamWrapper.write (/Users/xxx/.vscode/extensions/biomejs.biome-2.3.0/out/main.js:2999:16)
    at StreamMessageWriter.doWrite (/Users/xxx/.vscode/extensions/biomejs.biome-2.3.0/out/main.js:1429:31)
    at /Users/xxx/.vscode/extensions/biomejs.biome-2.3.0/out/main.js:1420:25
[cli-stdout] close
[Info  - 11:19:54] Connection to server got closed. Server will restart.
true
[cli-stderr] end
[cli-stderr] finish
[cli] close 0
[cli-stderr] close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant