-
Notifications
You must be signed in to change notification settings - Fork 17
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
Processing of luarocks fails when cwd is rocks or plugin directory #312
Comments
🤔 I suppose it could be a bug in the luarocks loader? |
Can you reproduce? I added:
and did the same |
A bug in |
No, because I have rocks.nvim installed with nix. |
I also was just migrating my config files (from lazy) and had a lot of issues with this the last few days. My setup files are in the plugin directory. I finally figured out that if that is my cwd then I get the above errors for a good portion (but not all) of my setup files. I haven`t investigated that further as my workaround was just to back out of the plugin before editing any files there. Not sure what other info I might be able to provide.... (I am super happy with nvim-rocks!!!) Thanks!! sample errors if cwd is nvim-rocks/plugin(otherwise no errors):
|
@boydkelly thanks for the input and nice words.
and did not encounter any errors. |
@boydkelly what system are you on? |
Ooh, could it be a path with spaces in it or something? 🤔 |
@mrcjkb So strange! I am in a Fedora 40 container. I did have luarocks installed in the container and removed that but still the same issue. Here is the complete repo. (Its working mostly, although a work in progress moving from lazy) I am also using NVIM_APPNAME=nvim-rocks, and was wondering if that somehow might be a problem? I will try to move it all to ./config/nvim and see if that makes any difference. For now I just have to not edit any of the files in plugin. My config does seem to be mostly working otherwise. Couple of issues that I will report later if I don't solve. Just an fyi, I don't have to edit a file in plugin. If plugin is my cwd, then just running nvim-rocks will output an ton of those errors, but if i start nvim-rocks anywhere else it works fine. |
Thanks. I'll see if I can reproduce it with your config later 👀 |
Running into a similar issue here on my Arch Linux install after the last Errors:
and
My dotfiles are here, hopefully they can help you replicate. |
@boydkelly I just installed all of your plugins with
@kflak the symptom seems related, but the error message looks different. It seems to be something thrown by luasnip. What makes it even stranger is that there's nothing but a parenthesis at the specified location (config.lua, line 100) at the v2.3.0 tag. |
@kflak I just tried with you config too, and couldn't reproduce it either. |
OK, I've managed to narrow it down to |
Maybe the bug was fixed but not released yet? |
Kind of doubt it, there hasn't been a commit there since 14 April, and I didn't have this problem before now... |
I'm seeing commits on April 16, 21 and 30. |
Just an update here. I made a basic install with only:
https://gitlab.com/boydkelly/nvim-nb.git I still get the following error starting neovim if my cwd is plugin:
I get this same error in both an Arch and Fedora container, as well as on a Fedora workstation. Albeit both the Arch and Fedora containers are toolboxes and share the same bash profile etc. However I don't see anything in PATH or environment that could affect this. The Fedora container contains a bunch of development stuff, but the Arch install is only the base container image + neovim. |
ok I think at least in my case I can see the issue. It appears to me to be a problem with lua5.4 and/or the way its configured in Fedora.
I think this may explain why its trying to process the lua files in the cwd: ;./?.lua;./?/i What led me to this was that recently i could no longer run Rocks update (sync would work). In the logs when attempting an updateI get a lot of --force-lock errors and in effect if I run luarocks on the command line i get:
Notable as well that I was getting the same issues with Arch, and both Arch (oci container) and Fedora are using lua 5.4 by default. There is a lua-compat 5.1 package in Fedora and I installed that but no luck there. Just installing an F38 container to test that... But is there also a config file where I can 'reset' the LUA_PATH? |
Maybe this should go elsewhere but it seems to be related. I am using git to manage my dotfiles. So I have this alias to config that points to git.
Not a huge problem. I can do a config (git) restore .config and get them back. But why is Rocks even looking at my home directory worktree? Is this the same 'LUA_PATH" issue and I was in ~ when I ran the command? Addendum: Got one of the messages doing Rocks sync:
But this time my .config files are intact. |
The rocks.nvim has The |
Closing, as I'm assuming this is the same issue as #554. |
I just stumbled upon this:
cd ~/.local/share/nvim/rocks/share/lua/5.1/rocks
and then running neovim throws:
Then doing a
cd ..
to get out of the rocks folder into~/.local/share/nvim/rocks/share/lua/5.1
Run neovim from that cwd -> it is fine. All good. I can even navigate with netrw/fzf to the rocks folder and open/edit files. All good.
So rocks.nvim fails if cwd is the rocks path it self?
NVIM v0.10.0-dev-3045+gefaf37a2b
Build type: RelWithDebInfo
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info
The text was updated successfully, but these errors were encountered: