JCWasmx86 / mesonlsp

An unofficial, unendorsed language server for meson written in C++
GNU General Public License v3.0
65 stars 8 forks source link

Broken pipe on editor connection #109

Closed hqnna closed 4 months ago

hqnna commented 4 months ago

Describe the bug When my editor, zed attempts to connect to mesonlsp, it fails.

To Reproduce Steps to reproduce the behavior:

  1. Install a clean install of the zed editor
  2. Install the Meson extension from the extensions screen
  3. Wait for it to download the grammar and lsp server
  4. Check the logs and you should see something like the following:
    2024-07-11T07:11:16-07:00 [INFO] starting language server "meson", path: "/Users/hanna/Projects/website", id: 6
    2024-07-11T07:11:17-07:00 [INFO] starting language server. binary path: "/Users/hanna/Library/Application Support/Zed/extensions/work/meson/mesonlsp-x86_64-apple-darwin.zip/mesonlsp", working directory: "/Users/hanna/Projects/website", args: ["--lsp"]
    2024-07-11T07:11:17-07:00 [ERROR] cannot read LSP message headers
    2024-07-11T07:11:17-07:00 [ERROR] Broken pipe (os error 32)
    2024-07-11T07:11:17-07:00 [ERROR] failed to start language server "meson": oneshot canceled
    2024-07-11T07:11:17-07:00 [ERROR] server stderr: Some("...")
    2024-07-11T07:11:17-07:00 [ERROR] Hit 4 reinstallation attempts for "meson"
    2024-07-11T07:11:17-07:00 [ERROR] server shut down

Expected behavior The LSP server should start and remain open, providing the editor suggestions.

Screenshots/Screencasts

image

System info

Additional context Downgrading the mesonlsp binary at the path in the log to the previous release fixes it.

JCWasmx86 commented 4 months ago

Thanks for this issue.

hqnna commented 4 months ago
  1. I'm on mac, there is no coredumpctl, I see a Broken Pipe error however
  2. I was creating a new project, so empty folder, try to create a new meson.build file
  3. Just seems to be the logs from the LSP: https://pastebin.com/fKwNnV7A
  4. It did it even when it worked so I don't think it's relevant
JCWasmx86 commented 4 months ago

Thanks, I was able to reproduce it and fix it. 4.3.1 is coming soon