nix-community / nixvim

Configure Neovim with Nix! [maintainers=@GaetanLepage, @traxys, @mattsturgeon, @khaneliman]
https://nix-community.github.io/nixvim
MIT License
1.74k stars 266 forks source link

[BUG] Updating `nixvim` with `nix flake update` errors. #1241

Closed computerscience-person closed 7 months ago

computerscience-person commented 7 months ago
Field Description
Plugin None
Nixpkgs unstable
Home Manager unstable

Description

Updating my system configuration inputs with nix flake update produces an error while updating the nixvim flake input.

Fish1 commented 7 months ago

What error are you getting? I am new to nix, but I also think nixvim is causing an error in unstable. error: `phpcbf` is now deprecated, use `php-codesniffer` instead which contains both `phpcs` and `phpcbf`.

traxys commented 7 months ago

What error are you getting? I am new to nix, but I also think nixvim is causing an error in unstable. error: `phpcbf` is now deprecated, use `php-codesniffer` instead which contains both `phpcs` and `phpcbf`.

This error could be caused by a missing nix flake update. This change was pretty recent, so you need a pretty recent revision of nixpkgs-unstable

computerscience-person commented 7 months ago

That's what I guessed as the issue as well, but I've just recently updated nixpkgs-unstable a very recent version (think a release on the day this comment was written), yet nixvim specifically doesn't evaluate, and it's only nixvim (though I haven't checked whether nixvim specifically has this issue or one of nixvim's inputs).

Error output for reference:

Screenshot_2024-03-11_10-55-14

computerscience-person commented 7 months ago

What error are you getting? I am new to nix, but I also think nixvim is causing an error in unstable. error: `phpcbf` is now deprecated, use `php-codesniffer` instead which contains both `phpcs` and `phpcbf`.

This is probably from the recent changes in the API some nixvim plugins, so modifying your config to follow the new API should be the fix you need.

GaetanLepage commented 7 months ago

Nixvim is now working with the latest nixos-unstable revision. https://github.com/nix-community/nixvim/pull/1239

computerscience-person commented 7 months ago

Nixvim is now working with the latest nixos-unstable revision. #1239

nixvim still errors for some reason.

image

traxys commented 7 months ago

This is strange I don't seem to have the same issue with my flake: image

alisonjenkins commented 7 months ago

Nixvim is now working with the latest nixos-unstable revision. #1239

nixvim still errors for some reason.

image

It looks like you might be hitting the git awareness of Nix. Make sure that all files in your nix repo are either staged or in Git commits and try again.

computerscience-person commented 7 months ago

Nixvim is now working with the latest nixos-unstable revision. #1239

nixvim still errors for some reason. image

It looks like you might be hitting the git awareness of Nix. Make sure that all files in your nix repo are either staged or in Git commits and try again.

git working tree is clean, so no issues there. The problem I think is supposed to be in the evaluation of the inputs of the flake.

GaetanLepage commented 7 months ago

@computerscience-person Have you been able to update since then ?

computerscience-person commented 7 months ago

I have, and it still doesn't work. However, I can say that the error comes from flake-parts as I tried to write a flake with flake-parts as input and the same error appeared.

image

computerscience-person commented 7 months ago

Also probably related to this [https://github.com/NixOS/nix/issues/6642](), but the thread there says that its supposedly due to untracked git files, which is not the problem in my case, as all my *.nix files are properly tracked by git.

computerscience-person commented 7 months ago

Fixed! Solved with sudo nix-store --repair --verify --check-content.