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

Plugin complaints about missing lua5.1 while luajit is installed #428

Closed
2 tasks done
pm4rcin opened this issue Sep 1, 2024 · 4 comments
Closed
2 tasks done

Plugin complaints about missing lua5.1 while luajit is installed #428

pm4rcin opened this issue Sep 1, 2024 · 4 comments
Labels
bug Something isn't working installation Can’t install/setup the plugin

Comments

@pm4rcin
Copy link

pm4rcin commented Sep 1, 2024

Prerequisites

  • I am using the latest stable release of Neovim
  • I am using the latest version of the plugin

Neovim Version

NVIM v0.10.1 Build type: RelWithDebInfo LuaJIT 2.1.1720049189

Operating system/version

Fedora Sway Atomic 40

Actual behavior

Hi, when I update the plugin with Lazy it complaints that lua5.1 is not present even though it's here with luajit. The plugin should account for that. Here's the output from lazy:

rest.nvim 7.52ms  VeryLazy
        `lua` version `5.1` needed, but found `Lua 5.4.6  Copyright (C) 1994-2023 Lua.org, PUC-Rio`
        `lua5.1` or `lua` or `lua-5.1` version `5.1` not installed

        This plugin requires `luarocks`. Try one of the following:
         - fix your `luarocks` installation
         - enable `hererocks` with `opts.rocks.hererocks = true`
         - disable `luarocks` support completely with `opts.rocks.enabled = false`

        Will try building anyway, but will likely fail...

        --------------------------------------------------------------------------------

        sh: linia 1: /usr/bin/lua-5.1: Nie ma takiego pliku ani katalogu
        Installing https://luarocks.org/rest.nvim-3.3.0-1.src.rock

        rest.nvim 3.3.0-1 depends on lua >= 5.1 (5.1-1 provided by VM)
        rest.nvim 3.3.0-1 depends on nvim-nio (1.10.0-1 installed)
        rest.nvim 3.3.0-1 depends on mimetypes (1.0.0-3 installed)
        rest.nvim 3.3.0-1 depends on xml2lua (1.6-2 installed)
        rest.nvim 3.3.0-1 depends on fidget.nvim (1.4.1-1 installed)
        rest.nvim 3.3.0-1 is now installed in /home/user/.local/share/nvim/lazy-rocks/rest.nvim (license: GPL-3.0)

        Removing rest.nvim scm-718...
        Removal successful.

Luarocks is installed from dnf package manager. I think that it should check for luajit and then for newer versions of lua.

Expected behavior

Plugin should install everything without errors or warnings.

Steps to reproduce

  1. Add plugin to lazy
  2. Try updating plugin
  3. Observe errors (even though thing works ok but with every update it's annoying)
@pm4rcin pm4rcin added the bug Something isn't working label Sep 1, 2024
@boltlessengineer boltlessengineer added the installation Can’t install/setup the plugin label Sep 1, 2024
@boltlessengineer
Copy link
Contributor

That error is from lazy.nvim and not rest.nvim.
I’m willing to help your issue to know exactly what is required for lazy.nvim users but you might get faster help by asking to their repo instead.

Outdated version of luarocks might not work with lazy.nvim, try install latest version (3.11.1) or set opts.rocks.hererocks = true from your lazy config as that error message says so lazy can use luarocks installed from hererocks, which will be latest version.

@boltlessengineer
Copy link
Contributor

Closing this as it is more like a lazy.nvim issue.
And it is resolved now (folke/lazy.nvim#1570) and possible solutions are provided by lazy.nvim.

Fill free to reopen it if you still can’t make it work even after trying those solutions.

@pm4rcin
Copy link
Author

pm4rcin commented Sep 3, 2024

You're absolutely right that it's related to lazy. Next time someone asks you about this tell them to use Lazy's health check to make sure everything is ok there. Sorry for the unnecessary noise and huge thanks for taking care of that plugin. It starts so fast now compared to V2 it did cut my nvim start by over 100ms which is definitely noticeable.

@boltlessengineer
Copy link
Contributor

No worries! This is a good issue that I can reference to future users using lazy.

Good to know that new lazy-loading mechanizm is working well. Thank you for letting me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working installation Can’t install/setup the plugin
Projects
None yet
Development

No branches or pull requests

2 participants