Skip to content
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

Rocks update fails #317

Closed
sahinf opened this issue May 6, 2024 · 5 comments · Fixed by #318
Closed

Rocks update fails #317

sahinf opened this issue May 6, 2024 · 5 comments · Fixed by #318

Comments

@sahinf
Copy link

sahinf commented May 6, 2024

When I try to update my rocks through :Rocks update, I get the following error

Error executing vim.schedule lua callback: .../.local/share/nvim/rocks/share/lua/5.1/nio/tasks.lua:100: Async task failed without callback: The coroutine failed with this
 message:
...share/nvim/rocks/rocks_rtp/lua/rocks/operations/init.lua:403: attempt to index field 'rocks' (a nil value)
stack traceback:
        ...share/nvim/rocks/rocks_rtp/lua/rocks/operations/init.lua: in function <...share/nvim/rocks/rocks_rtp/lua/rocks/operations/init.lua:374>
stack traceback:
        [C]: in function 'error'
        .../.local/share/nvim/rocks/share/lua/5.1/nio/tasks.lua:100: in function 'close_task'
        .../.local/share/nvim/rocks/share/lua/5.1/nio/tasks.lua:122: in function 'cb'
        .../.local/share/nvim/rocks/share/lua/5.1/nio/tasks.lua:188: in function <.../.local/share/nvim/rocks/share/lua/5.1/nio/tasks.lua:187>

This is after purging all my rocks and rocks.nvim itself and restarting from scratch.

checkhealth rocks

rocks: require("rocks.health").check()

Checking external dependencies ~
- OK luarocks: found ~/.local/share/nvim/rocks/bin/luarocks dev
- OK lua: found 

Checking rocks.nvim config ~
- OK No errors found in config.

Checking rocks.toml ~
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.
- OK No errors found in rocks.toml.

checkhealth rocks-config

rocks-config: require("rocks-config.health").check()

Checking for errors while loading configs ~
- OK No configuration errors.

Checking for duplicate configuration files ~
- OK No duplicate configurations found.

Rocks log

[START][2024-05-06 17:33:10] rocks.nvim logging initiated
ERROR | 2024-05-06 17:33:17 | ...share/nvim/rocks/rocks_rtp/lua/rocks/operations/init.lua:338 | Sync completed with errors! Run ':Rocks log' for details.
@mrcjkb
Copy link
Member

mrcjkb commented May 6, 2024

Hey 👋

Thanks for reporting 🙏
I've just published a fix. You should be able to install it with :Rocks install rocks.nvim 2.27.1.

@boydkelly
Copy link

I'm also getting this after updating to rocks.nvim 2.27.1

Error executing vim.schedule lua callback: ...local/share/nvim-rocks/rocks/share/lua/5.1/nio/tasks.lua:100: Async task failed witho
ut callback: The coroutine failed with this message: 
....local/share/nvim-rocks/rocks/share/lua/5.1/nio/init.lua:119: The coroutine failed with this message: Task was cancelled
stack traceback:
        [C]: in function 'error'
        ....local/share/nvim-rocks/rocks/share/lua/5.1/nio/init.lua:119: in function 'gather'
        .../luarocks/rocks-5.1/rocks.nvim/2.27.1-1/plugin/rocks.lua:45: in function <.../luarocks/rocks-5.1/rocks.nvim/2.27.1-1/plu
gin/rocks.lua:43>
stack traceback:
        [C]: in function 'error'
        ...local/share/nvim-rocks/rocks/share/lua/5.1/nio/tasks.lua:100: in function 'close_task'
        ...local/share/nvim-rocks/rocks/share/lua/5.1/nio/tasks.lua:122: in function 'cb'
        ...local/share/nvim-rocks/rocks/share/lua/5.1/nio/tasks.lua:188: in function 'waiter'
        ...cal/share/nvim-rocks/rocks/share/lua/5.1/nio/control.lua:57: in function 'set'
        ....local/share/nvim-rocks/rocks/share/lua/5.1/nio/init.lua:105: in function 'cb'
        ...local/share/nvim-rocks/rocks/share/lua/5.1/nio/tasks.lua:98: in function 'close_task'
        ...local/share/nvim-rocks/rocks/share/lua/5.1/nio/tasks.lua:122: in function 'cb'
        ...local/share/nvim-rocks/rocks/share/lua/5.1/nio/tasks.lua:188: in function 'waiter'
        ...cal/share/nvim-rocks/rocks/share/lua/5.1/nio/control.lua:116: in function 'wake'
        ...cal/share/nvim-rocks/rocks/share/lua/5.1/nio/control.lua:137: in function 'set_error'
        ...cal/share/nvim-rocks/rocks/share/lua/5.1/rocks/state.lua:37: in function 'on_exit'
        .../share/nvim-rocks/rocks/share/lua/5.1/rocks/luarocks.lua:70: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

@mrcjkb
Copy link
Member

mrcjkb commented May 7, 2024

I'm also getting this after updating to rocks.nvim 2.27.1

Error executing vim.schedule lua callback: ...local/share/nvim-rocks/rocks/share/lua/5.1/nio/tasks.lua:100: Async task failed witho
ut callback: The coroutine failed with this message: 
....local/share/nvim-rocks/rocks/share/lua/5.1/nio/init.lua:119: The coroutine failed with this message: Task was cancelled
stack traceback:
        [C]: in function 'error'
        ....local/share/nvim-rocks/rocks/share/lua/5.1/nio/init.lua:119: in function 'gather'
        .../luarocks/rocks-5.1/rocks.nvim/2.27.1-1/plugin/rocks.lua:45: in function <.../luarocks/rocks-5.1/rocks.nvim/2.27.1-1/plu
gin/rocks.lua:43>
stack traceback:
        [C]: in function 'error'
        ...local/share/nvim-rocks/rocks/share/lua/5.1/nio/tasks.lua:100: in function 'close_task'
        ...local/share/nvim-rocks/rocks/share/lua/5.1/nio/tasks.lua:122: in function 'cb'
        ...local/share/nvim-rocks/rocks/share/lua/5.1/nio/tasks.lua:188: in function 'waiter'
        ...cal/share/nvim-rocks/rocks/share/lua/5.1/nio/control.lua:57: in function 'set'
        ....local/share/nvim-rocks/rocks/share/lua/5.1/nio/init.lua:105: in function 'cb'
        ...local/share/nvim-rocks/rocks/share/lua/5.1/nio/tasks.lua:98: in function 'close_task'
        ...local/share/nvim-rocks/rocks/share/lua/5.1/nio/tasks.lua:122: in function 'cb'
        ...local/share/nvim-rocks/rocks/share/lua/5.1/nio/tasks.lua:188: in function 'waiter'
        ...cal/share/nvim-rocks/rocks/share/lua/5.1/nio/control.lua:116: in function 'wake'
        ...cal/share/nvim-rocks/rocks/share/lua/5.1/nio/control.lua:137: in function 'set_error'
        ...cal/share/nvim-rocks/rocks/share/lua/5.1/rocks/state.lua:37: in function 'on_exit'
        .../share/nvim-rocks/rocks/share/lua/5.1/rocks/luarocks.lua:70: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

That seems unrelated to this issue.
Could you please open a separate one and attach the output of :checkhealth rocks.nvim and :Rocks log?

@be4zad
Copy link

be4zad commented Jun 8, 2024

This issue happens when you have installed old luarocks which probably installed from package managers. Install latest luarocks from https://luarocks.org/

@mrcjkb
Copy link
Member

mrcjkb commented Jun 8, 2024

This issue happens when you have installed old luarocks which probably installed from package managers. Install latest luarocks from https://luarocks.org/

The latest version of rocks.nvim manages it's own luarocks installation (on linux and macos).
You need to unset luarocks_binary in your config for it to take effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants