oxalica / nil

NIx Language server, an incremental analysis assistant for writing in Nix.
Apache License 2.0
1.32k stars 39 forks source link

crash on save in neovim #67

Closed xanderio closed 1 year ago

xanderio commented 1 year ago

After updating to nil version 2023-03-01 I'm experiencing this crash every time I save a file to disk.

If I can provide any further information regarding this crash I'm happy to do that.

neovim config: https://github.com/xanderio/dotfiles/blob/main/home/develop/neovim/nvim/init.lua#L131-L144

Cleanup nvim lsp.log entry

[ERROR][2023-03-08 09:33:28] .../vim/lsp/rpc.lua:734    "rpc"   "nil"   "stderr"    
"thread 'main' panicked at 'no entry found for key', crates/ide/src/base.rs:126:10
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic_display
   3: core::panicking::panic_str
   4: core::option::expect_failed
   5: ide::base::FileSet::path_for_file
   6: nil::server::Server::apply_vfs_change
   7: nil::server::Server::run
   8: nil::main_loop
   9: nil::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace."

Sidenote: Love your work on nil, it's getting more amazing with every update :)

oxalica commented 1 year ago

Does b5797b481ae87de5d4d99791e08400b9ac5a43a5 fix for you?

erikreinert commented 1 year ago

Dealing with the same issue - can confirm the following overlay set to https://github.com/oxalica/nil/commit/b5797b481ae87de5d4d99791e08400b9ac5a43a5 fixes the problem for me:

  nil = super.nil.overrideAttrs(old: {
    src = super.fetchFromGitHub {
      owner = "oxalica";
      repo = "nil";
      rev = "b5797b481ae87de5d4d99791e08400b9ac5a43a5";
      sha256 = "sha256-5ABNUoXmlGjwkqGJ3YhUeQarcu0qwH7Al2tiuR/Pzoc=";
    };
  });
figsoda commented 1 year ago

Can we get a new release for this?