-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Build failing after updating nixpkgs-unstable with ln: failed to create symbolic link '/nix/store/...-vimplugin-treesitter-grammars/parser/lua.so': File exists
#368
Comments
ln: failed to create symbolic link '/nix/store/...-vimplugin-treesitter-grammars/parser/lua.so': File exists
ln: failed to create symbolic link '/nix/store/...-vimplugin-treesitter-grammars/parser/lua.so': File exists
I was looking at #361 but as far as I can tell this is a different issue, though again related to |
CC @Gerg-L since he mentioned breaking darwin before. |
Treesitter build failure prob nixpkgs fault |
To nobody's surprise... |
I wrote NixOS/nixpkgs#319233; I haven't tested with my personal NixOS configuration yet but it should have been built when I ran the package tests and others (r-vdp, PerchunPak) say it works for them. I ran The error message (file exists) is particularly strange, either that means there's two different grammars named lua (unlikely) or the build is somehow in an improper state, since there should never be files left from previous builds. Does |
It's happening because it's trying to copy the Lua parser twice. The Lua language module adds the Lua parser to As a workaround, you can disable adding the default grammar by setting The changes introduced in NixOS/nixpkgs#319233 don't handle duplicate entries. |
I see. Should I change the The module could also filter grammars with duplicate names before passing it to Lines 52 to 55 in c757d28
|
To handle multiple revisions of parsers, I suggest adding a suffix to each one to tell them apart, considering Neovim supports multiple parsers. Neovim loads the first available parser and parsers are searched for as nix-repl> pkgs.vimPlugins.nvim-treesitter.builtGrammars.c.name
"c-grammar-0.0.0+rev=deca017" Grammars already have a revision tag, so it should be an easy task. Identical parsers are unintentional, so the error makes sense. Not sure how it was handled before the changes, though. |
Thanks, will try that! As an extra data point (probably amounting to the same root cause): Inspecting the closures with |
I thought it could have been mnw, but it's not. As far as I remember, we add a few treesitter grammars by default to suppress Neovim health-checks. Markdown, markdown in-line, vim, Lua and one or two more. Those could be the reason behind the increased closure size. I will need to take a look. I have also been meaning to switch to https://github.com/viperML/tree-sitter/ for the grammars. Maybe this is a good excuse to do so. |
@NotAShelf Just to let you know: the (perceived) large size of |
ngl the by-default grammars with neovim-unwrapped are a real pain but theyre tiny when doing lazy.nvim you have to do rtp reset = false and THEN do the rtp reset yourself and place them before the builtins in the rtp when you do so. if they were removed, simply rtp.reset = false would work The nixpkgs ones only work with the wrappers because they are in the packpath which is first on the rtp so they shadow the builtins |
also, withAllGrammars didnt include any queries dirs until recently, but they worked before? and when those were added some parsers started having issues when lazy loaded, meaning there are some being included for all the grammars not just the builtins, SOMEHOW? The issue is IDK how they were being included before, but it still finds them with just the parsers in the rtp. Does anyone have any insight for me as to how the queries are being resolved when only the parser is in the rtp? |
nvim-treesitter has queries for many languages so that's probably where https://github.com/nvim-treesitter/nvim-treesitter/tree/master/queries you can use |
TYSM theyre literally copied into the nvim-treesitter directory hahaha now to hunt down from where. Edit: oh literally just from the repo..... hmmmm IDK what to do with this information tbh... ill have to sit on it for a bit |
anyway thank you so much I somehow forgot to look at the original source when I was looking at nixpkgs nvim-treesitter.... |
NixOS/nixpkgs#339589 (tracker) was just merged, so this can be closed. Please ping me if you see any other issues with current solution |
I'll keep this open until the PR hits unstable so that I don't forget about it. |
But looks like the universe wants it closed... |
The fix is in the |
👍 Cool, usually it's the other way around though, or am I mistaken? |
usually yeah. idk why but like 25% of the time its not XD |
TIL |
Ignore my previous silly comment... I consider this issue resolved, but I will keep it open until I am able to test the unstable branch myself. Thank you all for chiming in. |
Closed as the fix is now in all branches, the nixpkgs input has been updated. P.S. @FrothyMarrow I know you love me, stop being toxic |
fyi revert that should fix every other problem was just merged NixOS/nixpkgs#341079 (tracker) |
Description
Started getting this
ln: failed to create symbolic link '/nix/store/...-vimplugin-treesitter-grammars/parser/lua.so': File exists
build failure on both my Darwin and WSL machines after updating my nixpkgs input (which nvf follows) to the latest nixpkgs-unstable. I should note that theinstall: skipping file '/dev/fd/63', as it was replaced while being copied
line in the logs below is not relevant, see NixOS/nixpkgs#335016.👟 Reproduction steps
https://github.com/uncenter/flake
No changes to my flake configuration, just update(s) to Nixpkgs seemingly broke this. Not sure where this issue is coming from, NixOS/nixpkgs#319233 might have made it into nixpkgs-unstable around the time I updated the input?
👀 Expected behavior
Build succeeding for nvf.
😓 Actual Behavior
Build failed for nvf.
💻 Metadata
"aarch64-darwin"
- host os:Darwin 24.0.0, macOS 15.0
- multi-user?:yes
- sandbox:yes
- version:nix-env (Lix, like Nix) 2.91.0 System type: aarch64-darwin Additional system types: aarch64-darwin, x86_64-darwin Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /Users/uncenter/.config/nix/nix.conf:/Users/uncenter/.nix-profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/uncenter/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/gnc7drr3bs3kvmiir7drdigf6f6glagm-lix-2.91.0/share
- nixpkgs:/nix/store/p9sy5nf9jdwj69gmr3c3n03npzr5kkqi-source
📝 Relevant log output
The text was updated successfully, but these errors were encountered: