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

🐛 Issue with unsaved files #303

Open
2 of 3 tasks
Stanzilla opened this issue Aug 16, 2024 · 1 comment
Open
2 of 3 tasks

🐛 Issue with unsaved files #303

Stanzilla opened this issue Aug 16, 2024 · 1 comment
Labels

Comments

@Stanzilla
Copy link

VS Code version

1.92.2

Extension version

2.3.0

Biome version

1.8.3

Operating system

  • Windows
  • macOS
  • Linux

Description

I sometimes abuse unsaved files in an open project as a notepad, when I do that, CSC seems to try to run on them which fails with the following message

image

Steps to reproduce

  1. Open new file in a project that uses Biome
  2. Don't save it
  3. Write something to trigger Biome

Expected behavior

No errors

Does this issue occur when using the CLI directly?

No

Logs

Copying binary to temporary folder: file:///home/stan/.vscode-server/data/User/workspaceStorage/af22f4201bf263a53fb80c4d8a54ca94/biomejs.biome/biome
Executing Biome from: /home/stan/.vscode-server/data/User/workspaceStorage/af22f4201bf263a53fb80c4d8a54ca94/biomejs.biome/biome
[cli-stdout] data 43
[cli] exit 0
Connecting to "/home/stan/.cache/biome/biome-socket-1.8.3" ...
[Info  - 4:37:44 PM] Server initialized with PID: 207559
[Error - 5:17:41 PM] Request textDocument/codeAction failed.
  Message: failed to access range Range { start: Position { line: 7, character: 0 }, end: Position { line: 7, character: 0 } } in document untitled:Untitled-1 LineIndex { newlines: [0, 45, 46, 83, 84, 135, 136], line_wide_chars: {} }
  Code: -32603 
failed to access range Range { start: Position { line: 7, character: 0 }, end: Position { line: 7, character: 0 } } in document untitled:Untitled-1 LineIndex { newlines: [0, 45, 46, 83, 84, 135, 136], line_wide_chars: {} }

Caused by:
    position Position { line: 7, character: 0 } is out of range
@Stanzilla Stanzilla changed the title 🐛 🐛 Issue with unsaved files Aug 17, 2024
@nhedger
Copy link
Member

nhedger commented Aug 22, 2024

We recently released a nightly version, which takes a slightly different approach. Can you check if it solves your issue?

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

2 participants