xhyrom / zed-discord-presence

extension for zed that adds support for discord rich presence using lsp
https://git.sr.ht/~hyro/zed-discord-presence
GNU General Public License v3.0
98 stars 5 forks source link

panicking in git repository [arch linux] #4

Closed flafmg closed 3 months ago

flafmg commented 3 months ago

maybe im dumb, or idk, i changed my distro from mint to arch, when i was on mint it was working, but since the logs show an error idk if im being dumb or maybe something broke

2024-07-23T20:36:04.459734547-03:00 [INFO] new;
2024-07-23T20:36:04.460468367-03:00 [INFO] keep_updated;
2024-07-23T20:36:04.460513297-03:00 [INFO] new;
2024-07-23T20:36:15.059283702-03:00 [INFO] compiling Rust extension /home/<user name>/Documentos/zed/zed-discord-presence-0.2.0
2024-07-23T20:36:15.162227401-03:00 [INFO] compiling rust extension /home/<user name>/Documentos/zed/zed-discord-presence-0.2.0
2024-07-23T20:36:25.96692028-03:00 [ERROR] Cancelled LSP request task for "initialize" id 0 which took over 120s
2024-07-23T20:36:25.967104874-03:00 [ERROR] failed to start language server "discord_presence": LSP request timeout
2024-07-23T20:36:25.967183377-03:00 [ERROR] server stderr: Some("thread 'main' panicked at lsp/src/git.rs:17:41:\ncalled `Option::unwrap()` on a `None` value\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n")
2024-07-23T20:36:25.967281636-03:00 [INFO] retrying installation of language server "discord_presence" in 1s
2024-07-23T20:36:25.967360478-03:00 [ERROR] oneshot canceled
2024-07-23T20:36:26.967676153-03:00 [INFO] About to spawn test binary
2024-07-23T20:36:26.967811849-03:00 [WARN] test binary failed to launch
2024-07-23T20:36:26.967863137-03:00 [WARN] test binary check failed
2024-07-23T20:36:26.967912109-03:00 [INFO] beginning to reinstall server
2024-07-23T20:36:26.967987439-03:00 [INFO] deleting server container
2024-07-23T20:36:27.139328038-03:00 [ERROR] server container removal

Caused by:
    No such file or directory (os error 2)
2024-07-23T20:36:27.152551392-03:00 [INFO] starting language server "discord_presence", path: "/home/<user name>/Documentos/Projetos/rust/dandelion", id: 4
2024-07-23T20:36:27.30085534-03:00 [INFO] starting language server. binary path: "/home/<user name>/.local/share/zed/extensions/work/discord_presence/discord-presence-lsp-v0.2.0/discord-presence-lsp-x86_64-unknown-linux-gnu/discord-presence-lsp", working directory: "/home/<user name>/Documentos/Projetos/rust/dandelion", args: []
2024-07-23T20:36:44.996458945-03:00 [INFO] finished compiling extension /home/<user name>/Documentos/zed/zed-discord-presence-0.2.0
xhyrom commented 3 months ago

It's panicking here: https://github.com/xHyroM/zed-discord-presence/blob/ab6fd3481daaee7f8916c29a2e101e63463ee25c/lsp/src/git.rs#L36

I'll fix it, thanks for reporting. You're not dumb flafmg. It seems like you have a git repository without any remotes.

xhyrom commented 3 months ago

Fix is pushed, should be working after re-opening zed. Please let me know after trying again :D

flafmg commented 3 months ago

oh, thanks :D now it is working!

flafmg commented 3 months ago

It's panicking here:

https://github.com/xHyroM/zed-discord-presence/blob/ab6fd3481daaee7f8916c29a2e101e63463ee25c/lsp/src/git.rs#L36

I'll fix it, thanks for reporting. You're not dumb flafmg. It seems like you have a git repository without any remotes.

oh that makes sense, this is why in my other OS it is working, bc the project there has a remote, the one im in doesnt have one yet

flafmg commented 3 months ago

image :D