nvim-neorocks / rocks.nvim

🌒 Neovim plugin management inspired by Cargo, powered by luarocks
GNU General Public License v3.0
659 stars 12 forks source link

Error while running `:Rocks update` #540

Closed TarunDaCoder closed 1 day ago

TarunDaCoder commented 2 days ago

Hello, I get this error when I run :Rocks update

Error executing luv callback:                                                                                                                                                               
...arun/.local/share/nvim/rocks/share/lua/5.1/nio/tasks.lua:100: Async task failed without callback: The coroutine failed with this message:                                                
...un/.local/share/nvim/rocks/share/lua/5.1/nio/control.lua:293: ...10.1/nvim-linux64/share/nvim/runtime/lua/vim/_system.lua:244: ENOENT: no such file or directory                         
stack traceback:                                                                                                                                                                            
        [C]: in function 'error'                                                                                                                                                            
        ...un/.local/share/nvim/rocks/share/lua/5.1/nio/control.lua:293: in function 'with'                                                                                                 
        ...are/nvim/rocks/rocks_rtp/lua/rocks/operations/update.lua:72: in function <...are/nvim/rocks/rocks_rtp/lua/rocks/operations/update.lua:71>                                        
stack traceback:                                                                                                                                                                            
        [C]: in function 'error'                                                                                                                                                            
        ...arun/.local/share/nvim/rocks/share/lua/5.1/nio/tasks.lua:100: in function 'close_task'                                                                                           
        ...arun/.local/share/nvim/rocks/share/lua/5.1/nio/tasks.lua:122: in function 'cb'                                                                                                   
        ...arun/.local/share/nvim/rocks/share/lua/5.1/nio/tasks.lua:188: in function 'waiter'                                                                                               
        ...un/.local/share/nvim/rocks/share/lua/5.1/nio/control.lua:116: in function 'wake'                                                                                                 
        ...un/.local/share/nvim/rocks/share/lua/5.1/nio/control.lua:129: in function 'set'                                                                                                  
        .../.local/share/nvim/rocks/rocks_rtp/lua/rocks-git/git.lua:218: in function 'on_exit'                                                                                              
        ...10.1/nvim-linux64/share/nvim/runtime/lua/vim/_system.lua:300: in function <...10.1/nvim-linux64/share/nvim/runtime/lua/vim/_system.lua:270>                                      
Press ENTER or type command to continue    

But the command still runs, although it doesn't update my rocks.toml for some reason.

rocks.nvim version: 2.40.1 neovim version: v0.10.1

Here is my rocks.toml -

[treesitter]
auto_highlight = "all"
auto_install = "prompt"

[rocks]

[plugins]
"rocks.nvim" = "2.40.0"
nvim-web-devicons = "0.100"
"rocks-git.nvim" = "2.2.0"
"plenary.nvim" = "scm"
luasnip = { version = "2.3.0", event = 'InsertEnter' }
"rocks-config.nvim" = "2.3.1"
nvim-ts-autotag = "scm"
nvim-surround = { version = "2.1.5", event = "InsertEnter" }
"overseer.nvim" = { version = "1.4.0", event = "DeferredUIEnter" }
"feline.nvim" = { version = "1.6.3", event = 'BufEnter' }
"conform.nvim" = { version = "8.1.0", event = 'BufWritePre' }
"trouble.nvim" = { version = "3.6.0", event = "DeferredUIEnter" }
"lspkind.nvim" = { version = "scm", event = "InsertEnter" }
nvim-autopairs = { version = "scm", event = 'InsertEnter' }
"which-key.nvim" = { version = "3.13.2", event = 'DeferredUIEnter' }
alpha-nvim = "scm"
"rocks-lazy.nvim" = "1.0.1"
"rocks-edit.nvim" = "scm"
friendly-snippets = { version = "scm", event = 'InsertEnter' }
neorg-interim-ls = { version = "1.2.1" }
nvim-notify = { version = "3.13.5" }
"sus.nvim" = { version = "1.0.0", event = 'DeferredUIEnter' }
rustaceanvim = { version = "5.4.2", ft = 'rust' }
"todo-comments.nvim" = { version = "1.3.0", event = 'DeferredUIEnter' }
neorg-se = { version = "1.1.10" }
"flash.nvim" = { version = "2.1.0" }
nvim-ufo = { version = "1.4.0", event = 'DeferredUIEnter' }
"lazydev.nvim" = { version = "1.8.0" }
"indentmini.nvim" = { version = "scm", event = 'DeferredUIEnter' }
"image.nvim" = { version = "1.3.0", ft = ['markdown', 'norg'] }
nvim-dap = "scm"
"helpview.nvim" = { version = "1.1.0", event = 'DeferredUIEnter' }
"markview.nvim" = { version = "23.1.0", ft = 'markdown' }

# Treesitter
"rocks-treesitter.nvim" = "1.1.2"
nvim-treesitter-legacy-api = "0.9.2"
tree-sitter-toml = "scm"
tree-sitter-lua = "scm"
tree-sitter-norg-meta = "0.1.0"
tree-sitter-html = "scm"
tree-sitter-zig = "scm"
tree-sitter-html_tags = "scm"
tree-sitter-regex = "scm"
tree-sitter-javascript = "scm"
tree-sitter-typescript = "scm"
tree-sitter-ecma = "scm"
tree-sitter-rust = "scm"
tree-sitter-tmux = "scm"

[plugins."oil.nvim"]
version = "2.12.2"
keys = [{ lhs = '-', rhs = ':Oil<CR>', desc = 'Oil' }]

[plugins.cmp-path]
version = "scm"

[plugins.cmp_luasnip]
version = "scm"

[plugins."telescope.nvim"]
version = "scm"
event = "DeferredUIEnter"

[plugins.'nvim-tree.lua']
version = "1.6.0"
event = 'DeferredUIEnter'

[plugins.neorg]
version = "9.1.1"

[plugins.neorg-telescope]
version = "1.2.2"

[plugins."gitsigns.nvim"]
git = "lewis6991/gitsigns.nvim"
rev = "v0.9.0"
event = 'DeferredUIEnter'

[plugins."nvim-colorizer.lua"]
git = "nvchad/nvim-colorizer.lua"
rev = "master"
event = 'DeferredUIEnter'

[plugins."telescope-symbols.nvim"]
git = "nvim-telescope/telescope-symbols.nvim"
rev = "master"
event = 'DeferredUIEnter'

[plugins."live-server.nvim"]
git = "barrett-ruth/live-server.nvim"
rev = "main"
ft = ['html', 'css', 'js']

[plugins.neocodeium]
git = "monkoose/neocodeium"
rev = "main"
opt = true

[plugins."barbar.nvim"]
git = "romgrk/barbar.nvim"
rev = "v1.9.1^{}"
event = 'DeferredUIEnter'

[plugins.nvim-scissors]
git = "chrisgrieser/nvim-scissors"
rev = "main"
event = 'InsertEnter'

[plugins.neorg_extras]
git = "juniorsundar/neorg_extras"
rev = "v0.3.1"

[plugins."dress.nvim"]
git = "axlefublr/dress.nvim"
rev = "4c293b1d2688dbe06d0533dcbd98c3ad7f2534b7"
event = 'DeferredUIEnter'

[plugins."diagram.nvim"]
git = "3rd/diagram.nvim"
rev = "feaab9bf6b5e895a8eca18947214c2787410648d"
ft = ['markdown', 'norg']
config = false

[plugins."lsp_lines.nvim"]
git = "https://git.sr.ht/~whynothugo/lsp_lines.nvim"
event = 'LspAttach'
rev = "v3.0.0^{}"

[plugins."care.nvim"]
git = "max397574/care.nvim"
rev = "main"

[plugins.care-cmp]
git = "max397574/care-cmp"
rev = 'main'

[plugins.nvim]
git = "catppuccin/nvim"
rev = "v1.9.0"

[plugins.nvim-rip-substitute]
git = "chrisgrieser/nvim-rip-substitute"
cmd = "RipSubstitute"
keys = [
  { lhs = '<leader>r', rhs = ':RipSubstitute<CR>', desc = 'Search and Replace' },
]

[plugins."tiny-code-action.nvim"]
git = "rachartier/tiny-code-action.nvim"
rev = "25874e2f2197fe5ae939b824f0f983c9a062ad7e"

[bundles.completion] 
items = [
    "care.nvim",
    "cmp-path",
    "care-cmp",
    "cmp_luasnip"
]
config = "tarun.plugins.care"

[config]
plugins_dir = 'tarun/plugins/'
auto_setup = true

# Neovim options
[config.options]
relativenumber = true
number = true
splitbelow = true
splitright = true
wrap = false
expandtab = true
tabstop = 4
shiftwidth = 4
clipboard = "unnamedplus"
scrolloff = 999
virtualedit = "block"
inccommand = "split"
ignorecase = true
termguicolors = true
updatetime = 100
conceallevel = 2
foldlevel = 99
fileformat = "unix"
background = "dark"
backspace = "2"
swapfile = false
laststatus = 3
timeoutlen = 150
signcolumn = 'yes:2'
cmdheight = 0

Any help would be appreciated :D

mrcjkb commented 1 day ago

potential duplicate of https://github.com/nvim-neorocks/rocks-git.nvim/issues/49?

TarunDaCoder commented 1 day ago

I don't think so, as the error is a bit different, and I tried doing rm -rf ~/.local/share/nvim and re-installing rocks.nvim but it still errors when I do :Rocks update

mrcjkb commented 1 day ago

the error is almost the same as the one posted in this comment (just with different line numbers).

It's really confusing. On the one hand, ENOENT: no such file or directory is thrown by vim.system when it can't find the command (this could be luarocks or git or a rocks-git build command in this case) - I really wish vim.system would output more info about the command that failed!

On the other hand, the error appears to be thrown when calling future.set() after successfully invoking vim.system in rocks-git.nvim. The confusing stack trace looks like a potential bug in nvim-nio (cc @rcarriga, I vaguely remember you fixing something similar previously).

Do you have anything in your :Rocks log? If not, you might need to set the log level to something more verbose.

I will look into wrapping our vim.system calls with something that produces more useful error messages soon.

mrcjkb commented 1 day ago

@TarunDaCoder I've just pushed a release to rocks-git.nvim that should prevent panics when invoking vim.system (the checks are already in place in rocks.nvim). Can you run :Rocks update rocks-git.nvim and then try again?

TarunDaCoder commented 1 day ago

@mrcjkb Yup, that fixed it! Thanks man, appreciate it.