biome-zed icon indicating copy to clipboard operation
biome-zed copied to clipboard

Biome making code actions freeze

Open christian-gama opened this issue 9 months ago • 7 comments

I did not figure it out what is triggering this bug, but the code actions is simply not showing up after a random period of time after the IDE is open. Most of the times this bug happens within a minute or two after the IDE is open. The only way to make code actions work again is by restarting the IDE or disabling the Biome extension.

By freezing I mean that when I press cmd + . to trigger the code actions menu, nothing happens.

christian-gama avatar May 03 '24 13:05 christian-gama

I’m not sure if this is Zed or Biome binary issue, but I managed to consistently reproduce the problem.

Basically I just perform “Go to Definition”, which will bring me to the node_modules source, if I continue to browse some files in there, and go back to my code again, all biome stuff stop working, linking, code action, formatted, etc.

I am thinking if this is because Zed/biome is having hard time to process too many files at a time.

https://github.com/biomejs/biome-zed/assets/15154097/25b54365-33f5-440c-97ea-cb2af31ada58

chungweileong94 avatar May 04 '24 05:05 chungweileong94

One thing to note is that if you are using Biome 1.7.2, and perform the steps that I mentioned above, you will get this issue https://github.com/biomejs/biome/issues/2683, downgrade the version will get rid of the error, but the biome issue on Zed will remain. Which there might be a possibility where the 1.7.2 surface the issue.

chungweileong94 avatar May 04 '24 05:05 chungweileong94

After checking the LSP RPC logs, it seems like it's caused by Biome LSP, for some reason, Biome LSP stopped working properly after I started opening some files from node_modules.

Setting the vsc option does help reduce this a lot, but the problem will happen again randomly.

"vcs": {
    "enabled": true,
    "clientKind": "git",
    "useIgnoreFile": true
}

https://github.com/biomejs/biome-zed/assets/15154097/7c224c58-0b36-4c53-a0a6-6a2ae61d76f5

chungweileong94 avatar May 04 '24 07:05 chungweileong94

Can you update to biome v1.7.3? We have an issue that was causing some panics

ematipico avatar May 06 '24 15:05 ematipico

Can you update to biome v1.7.3? We have an issue that was causing some panics

Yeah, just upgraded to 1.7.3, and the panics are no longer happening. Will have to give it a day or two to see if the LSP freeze issue still happening, but so far it looks pretty solid.

chungweileong94 avatar May 06 '24 16:05 chungweileong94

I've got something similar, and it's still happening with 1.7.3 After a little while the biome extension seems to stop working - no formatting, no code actions, nothing. Restarting zed fixes it for a while.

I did notice this in the log just now: 2024-05-07T14:38:43+10:00 [ERROR] crates/lsp/src/lsp.rs:352: cannot read LSP message headers 2024-05-07T14:38:43+10:00 [WARN] Generic lsp request to biome_lsp failed: server shut down

Is there somewhere I can see more detailed logs?

thm76 avatar May 07 '24 04:05 thm76

I think this is a zed issue. You can find more logs here: https://biomejs.dev/guides/integrate-in-editor/#daemon-logs

ematipico avatar May 07 '24 06:05 ematipico

I have not seen this in a while btw. (Im on Zed 0.139 and biome 1.8.0)

luckydye avatar Jun 10 '24 12:06 luckydye

I'll close this issue as it appears to be fixed.

https://github.com/zed-industries/zed/issues/10786

luckydye avatar Jun 30 '24 18:06 luckydye