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

About init function #19

Closed
jinzhongjia opened this issue Oct 31, 2023 · 18 comments
Closed

About init function #19

jinzhongjia opened this issue Oct 31, 2023 · 18 comments

Comments

@jinzhongjia
Copy link
Contributor

jinzhongjia commented Oct 31, 2023

The wait here does not exist, which will cause the plug-in initialization to fail.

@mrcjkb
Copy link
Member

mrcjkb commented Oct 31, 2023

Which version of Neovim are you using? This was written for Neovim 0.10 (nightly).

luarocks.cli returns the result of its underlying call to vim.system, which is a vim.SystemObject. A vim.SystemObject has a :wait() function.

Anyway, the install process is going to change, and the bootstrap_install will be removed.

@jinzhongjia
Copy link
Contributor Author

I am using nightly, but it seems that if the network is not good, the installation of dependencies will fail.

@jinzhongjia
Copy link
Contributor Author

Everything is normal now. By the way, the installation method of readme has not been completed yet, right?
I am currently using a method similar to lazy to install it.

@jinzhongjia
Copy link
Contributor Author

I found that luarocks will fail to install toml-edit.
When I try to install it through the command line, the following prompt appears:
image

@jinzhongjia jinzhongjia reopened this Oct 31, 2023
@mrcjkb
Copy link
Member

mrcjkb commented Oct 31, 2023

Yes, this is still very much WIP 😅

It looks like you have lua 5.4 installed, and it's trying to find toml-edit for that version.
Neovim uses luaJIT (with lua 5.1 compatibility), so you'll need one of those lua versions.

Which platform are you on?

@jinzhongjia
Copy link
Contributor Author

jinzhongjia commented Oct 31, 2023

I work in archlinux under wsl2, I checked the official library of archlinux and the dependency of luarocks is lua5.4

@jinzhongjia
Copy link
Contributor Author

@jinzhongjia
Copy link
Contributor Author

maybe I can install this? https://aur.archlinux.org/packages/lua51-luarocks-build-rust-mlua

no effect

@jinzhongjia
Copy link
Contributor Author

I tried this, https://aur.archlinux.org/packages/lua-luarocks-build-rust-mlua
it works

@mrcjkb
Copy link
Member

mrcjkb commented Oct 31, 2023

I work in archlinux under wsl2, I checked the official library of archlinux and the dependency of luarocks is lua5.4

That sounds like a packaging "bug" on the Arch Linux side. luarocks can run with any lua version between 5.1 and 5.4 (and luaJIT).
I guess you can still install lua 5.1. This plugin configures luarocks to use lua 5.1, but that won't work if it isn't installed.

@NTBBloodbath
Copy link
Member

I found that luarocks will fail to install toml-edit. When I try to install it through the command line, the following prompt appears: image

The same thing happened to me a couple of days ago, can you check what your luarocks config returns? Your lua_version should point to 5.1 and it seems like it could be pointing to 5.4. This causes the dependency to be installed correctly, but luarocks cannot recognize it because it looks for it in the wrong directory. Being honest, luarocks should search under the same version that is specified in the CLI but that is already upstream, nothing that can be done from this side :(

@jinzhongjia
Copy link
Contributor Author

lua5.1 and lua5.4 can coexist on my computer, but luarocks config outputs 5.4

@jinzhongjia
Copy link
Contributor Author

But when I specify lua-version is 5.1, its output is 5.1

@NTBBloodbath
Copy link
Member

But when I specify lua-version is 5.1, its output is 5.1

I think I have an idea. Are PATHs like lua_modules_path also updated or do they still show 5.4 the luarocks config output?

@jinzhongjia
Copy link
Contributor Author

here is 5.4 output https://gist.github.com/jinzhongjia/0b1acc55bebd5a56a7e17f9a9df6f53e

5.1 output https://gist.github.com/jinzhongjia/bcfbda053813f8e2e8e3236e9b811cf8

@NTBBloodbath
Copy link
Member

Honestly, I have no idea now. Everything looks correct and I took a look at the luarocks code that has to do with the configuration to see if I found something but everything is fine.

There are some issue reports with the same dependency in the luarocks repository with other projects but unfortunately none have had any response with a proper solution from the luarocks maintainers, here is an example of them and in this other one, even though it is another use case, the same thing happens and ultimately, it seems to be an internal luarocks bug with their build system in some edge cases like this one where a custom builder is being used for the dependencies 😥

@NTBBloodbath
Copy link
Member

Update: could you open a separate issue to track the problem when trying to install toml-edit using luarocks? That way everything would be more organized and the original problem of this issue seems to have been solved. Thanks in advance!

Ps: I think that following a suggestion made by @mrcjkb we could solve it and also eliminate some dependencies such as requiring having Rust installed, we are going to investigate further on this one.

@jinzhongjia
Copy link
Contributor Author

ok, I will open a new issue

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

No branches or pull requests

3 participants