beancount-language-server icon indicating copy to clipboard operation
beancount-language-server copied to clipboard

Unhelpful `unwrap()` errors

Open bspeice opened this issue 9 months ago • 0 comments

I've been attempting to use this as part of a Neovim/Mason setup, but some uses of unwrap() without any context. First, it seems to be that this server attempts to use bean-check:

https://github.com/polarmutex/beancount-language-server/blob/80009c0f7680b272d5417d34c25e87d576bcd609/crates/lsp/src/providers/diagnostics.rs#L44

After reading through the code here, I realized that I hadn't actually installed beancount.

In addition, there's an unwrap() that appears to be hitting an error condition, but I can't figure out what URL is being referred to:

[ERROR][2023-11-21 11:42:30] .../vim/lsp/rpc.lua:734	"rpc"	"C:\\Users\\%USER%\\AppData\\Roaming\\nvim-data\\mason\\bin\\beancount-language-server.CMD"	"stderr"	"thread '<unnamed>' panicked at C:\\Users\\%USER%\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\beancount-language-server-1.3.1\\src\\providers\\diagnostics.rs:62:73:\ncalled `Result::unwrap()` on an `Err` value: ()\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n"

https://github.com/polarmutex/beancount-language-server/blob/80009c0f7680b272d5417d34c25e87d576bcd609/crates/lsp/src/providers/diagnostics.rs#L62

It's not necessarily that panicking is the problem, but I have no idea what URL is problematic or what I can do to resolve this.

bspeice avatar Nov 21 '23 17:11 bspeice