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 with Deno LSP on Windows when searching project symbols #11391

Open
bpollack opened this issue Jul 31, 2024 · 4 comments
Open

Crash with Deno LSP on Windows when searching project symbols #11391

bpollack opened this issue Jul 31, 2024 · 4 comments
Labels
A-command Area: Commands C-bug Category: This is a bug

Comments

@bpollack
Copy link

bpollack commented Jul 31, 2024

Summary

When I open a Deno project, using the Deno LSP, and attempt to navigate to a symbol (i.e. <Space>S) on Windows, Helix crashes with the following error:

thread 'main' panicked at helix-term\src\commands\lsp.rs:184:44:
called `Result::unwrap()` on an `Err` value: ()

The stack trace with RUST_BACKTRACE set full doesn't yield any symbols (it's just memory addresses bottoming out at BaseThreadInitHunk)

Reproduction Steps

I tried this:

  1. Set up a Deno project with Helix. You can use https://git.sr.ht/~bmp/hayom if you want one that's already set up
  2. Open any file in the project
  3. Hit <Space>S to open the workspace symbol picker
  4. Helix will crash

Note that this does not happen on macOS or Linux, just Windows.

I'm using Deno 1.45.4 for this test.

Helix log

Backtrace:

thread 'main' panicked at helix-term\src\commands\lsp.rs:184:44:
called `Result::unwrap()` on an `Err` value: ()
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

(Running with RUST_BACKTRACE=full, as noted, just prints out memory addresses with no symbols.)

~/.cache/helix/helix.log

I can't fit the log here; it's over the length limit with the above repro steps due to the symbol dump getting in there. I'm happy to provide it on request.

Platform

Windows

Terminal Emulator

Windows Terminal

Installation Method

scoop

Helix Version

24.7

@bpollack bpollack added the C-bug Category: This is a bug label Jul 31, 2024
@the-mikedavis
Copy link
Member

Can you try building from source? The function that crashed was changed in #9647 and shouldn't crash any more. Based on the backtrace I assume deno is sending an invalid or custom URI that we can't convert into a file path. (I believe there are other issues we've seen where deno does that.)

@the-mikedavis the-mikedavis added the A-command Area: Commands label Jul 31, 2024
@bpollack
Copy link
Author

On a very quick pass, building Helix fails because the tree-sitter grammars are failing to compile properly. I'll need to poke and see what's up. Do I have to use Rust 1.74? I'm wondering if this is a toolchain issue

@the-mikedavis
Copy link
Member

You'll need at least Rust 1.74 and a C/C++ compiler. The tree-sitter grammars are written in C/C++ so the C/C++ compiler may be the issue

@bpollack
Copy link
Author

Yeah, I'm completely failing to get them to build on either Windows box; they're dying with a pile of symbol errors. I haven't had time to figure out what's up there, but I will update this issue if I can sort that and then confirm the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-command Area: Commands C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants