crisidev / bacon-ls

A Language Server for Rust using Bacon diagnostics
https://github.com/crisidev/bacon-ls
MIT License
18 stars 0 forks source link

Zed Extension #1

Closed bbb651 closed 4 days ago

bbb651 commented 2 weeks ago

Thank you for creating this language server!

I've made an attempt at creating an extension (currently it only tries to downloads bacon-ls if needed and expects bacon to be installed), I got to the point that it downloads it correctly, I feel like I'm really close, but I'm getting:

2024-10-02T23:25:21.903509506+03:00 [WARN] request completed with error: failed to connect to the server

and debugging extensions in Zed is not great at the moment, I would love some help if your interested and have the time. Also it would be nice to provide x86 binaries in releases, I don't personally use them but the Zed extension api has it as an option (It might only relevant for windows?) and it currently errors out in that case. Upstream issue about bacon: https://github.com/zed-industries/zed/issues/15912

crisidev commented 2 weeks ago

Hello, thanks for opening this issue.

I'll prefix this by saying I have never used Zed. In terms of binary releases, they are already available and built with CI on new releases. Example: https://github.com/crisidev/bacon-ls/releases/tag/v0.3.0

Regarding your specific issue, I am not sure how this works with Zed.. Is there any way to get more info about the error you have in the issue? Is that coming from connecting to bacon-ls?

bbb651 commented 2 weeks ago

I meant x86 as in 32-bit x86, I'm aware the releases contain x86_64 and aarch64 binaries, sorry I wasn't clear.

Extension in Zed don't yet have great documentation, they're mostly copied and modified from each other (this one is based from the zig one). This is my first time writing an extension (although I've contributed to some a bit), I'll try to debug it more or ask for help on the Zed discord. In theory everything all lsp related errors things are reported in the log, but a lot of errors are not very helpful (like this one).

crisidev commented 2 weeks ago

Oh, ok, I can change the build system to also build for 32bit x86. Would you like Linux and windows binaries?

crisidev commented 1 week ago

Added i686 linux and windows: https://github.com/crisidev/bacon-ls/commit/638a7213744309f5bc5c75ea88269b72b81c1319

I'll try to kick off a new release build

crisidev commented 1 week ago

Github action run: https://github.com/crisidev/bacon-ls/actions/runs/11290889318

crisidev commented 1 week ago

It did not work, we need i686 libraries

crisidev commented 1 week ago

Potential fix: https://github.com/crisidev/bacon-ls/commit/a606df65b1ef26d034f25f76be3bbe50304e4700

crisidev commented 1 week ago

The release is taking ages on Mac builds: https://github.com/crisidev/bacon-ls/actions/runs/11291016153

crisidev commented 4 days ago

I think the problem was that I was using very old Macos runner types. I have fixed it now, let's see if this works: https://github.com/crisidev/bacon-ls/actions/runs/11401158335

crisidev commented 4 days ago

Finally the release succeeded and we now have i686 builds: https://github.com/crisidev/bacon-ls/releases/tag/v0.3.1