-
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
bare repo setup user home directory appears to interfere with rocks update/sync #554
Comments
Hey 👋 This looks like it could be related to #312.
This definitely looks like it's a rocks-git.nvim issue. |
Hmm, somehow missed that, yes, seems related. When I noticed the issue I was also in my nvim's config folder, I first tried changing working directories from within nvim itself (i.e. However, testing now and yes as long as I'm not in the config directory ( Even then though, with successful runs I still get warning/errors in the Rocks log about being unable to parse latest tags and being unable to determine latest version from rocks-git for just a few of my plugins (pasting here just in case it's somehow related, can open separate issue in rocks-git if not). rocks log for the latest tag latest version warnings/errors[START][2024-10-12 09:26:05] rocks.nvim logging initiated Other things to note after reading through #312 :
I am able to reproduce in the sense that it always happens with this current NVIM_APPNAME config. I am not able to reproduce against other attempts at recreating under new NVIM_APPNAME configs yet though. I'm on arch as well - here's the output of running luarocks path in case it's useful $ luarocks pathexport LUA_PATH='/usr/share/lua/5.4/?.lua;/usr/local/share/lua/5.4/?.lua;/usr/local/share/lua/5.4/?/init.lua;/usr/share/lua/5.4/?/init.lua;/usr/local/lib/lua/5.4/?.lua;/usr/local/lib/lua/5.4/?/init.lua;/usr/lib/lua/5.4/?.lua;/usr/lib/lua/5.4/?/init.lua;./?.lua;./?/init.lua;/home/ghost/.luarocks/share/lua/5.4/?.lua;/home/ghost/.luarocks/share/lua/5.4/?/init.lua' Is there a way to get more verbose logging in rocks log? |
I've just released a new version of rocks-git.nvim with a potential fix that sets the Could you please let me know if this solves your issue? |
Thanks. I've tried rocks log when running `:Rocks update` in config directory[START][2024-10-15 22:10:51] rocks.nvim logging initiated Error: Failed cloning git repository. ERROR | 2024-10-15 22:11:18 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install rocks-edit.nvim Error: Failed cloning git repository. ERROR | 2024-10-15 22:11:26 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install lush.nvim Error: Failed cloning git repository. ERROR | 2024-10-15 22:11:29 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install telescope.nvim Error: Failed cloning git repository. ERROR | 2024-10-15 22:11:36 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install express_line.nvim rocks log when running `:Rocks sync` in config directory[START][2024-10-15 22:21:12] rocks.nvim logging initiated Again the log from the
Lastly, just to confirm starting nvim from my config directory and then changing nvim's working directory from within nvim itself (i.e. |
🤔 This tells me it's actually interfering with luarocks. I've just pushed a similar fix in which rocks.nvim sets the directory to the |
Unfortunately still no dice with rocks.nvim = 2.40.4 rocks log from `:Rocks update` showing same errors[START][2024-10-17 08:21:19] rocks.nvim logging initiated Error: Failed cloning git repository. ERROR | 2024-10-17 08:21:38 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install telescope.nvim Error: Failed cloning git repository. ERROR | 2024-10-17 08:21:45 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install rocks-edit.nvim Error: Failed cloning git repository. ERROR | 2024-10-17 08:21:51 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install lush.nvim Error: Failed cloning git repository. ERROR | 2024-10-17 08:21:58 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install express_line.nvim However, I do think I've stumbled on why this is happening perhaps. Seems that when using the NVIM_APPNAME env variable to start nvim AND starting nvim from the config directory, for some reason it adds GIT_WORK_TREE and GIT_DIR to the enviornment in nvim (see below for examples): `tabnew | r !printenv` when starting with NVIM_APPNAME from home directoryATUIN_HISTORY_ID=01929a7cf842747f98bce004dbb905dd `tabnew | r !printenv` when starting with NVIM_APPNAME from config directory (notice the extra env variables at the end of the listATUIN_HISTORY_ID=01929a7a275577449ce4cae237fea825 And a cleaner diff view of the output from both (focusing only on the two new env variables)
If I then try to unset the work tree using rocks log output when starting from config dir with NVIM_APPNAME and trying to manually unset GIT_WORK_TREE[START][2024-10-17 08:48:26] rocks.nvim logging initiated Error: Failed to fetch submodules. ERROR | 2024-10-17 08:49:29 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install rocks-edit.nvim Error: Failed to fetch submodules. ERROR | 2024-10-17 08:49:36 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install express_line.nvim Error: Failed to fetch submodules. ERROR | 2024-10-17 08:49:40 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install telescope.nvim Error: Failed to fetch submodules. ERROR | 2024-10-17 08:49:48 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install lush.nvim I'm not sure how helpful this is at all - I'm inclined to just make a note to not run rocks update/sync from my config directory when using a bare repo. |
That sounds very fishy. I'm pretty sure it's not built-in Neovim behaviour:
Could this be caused by a plugin or your distro/package manager? Since this affects luarocks, it will be resolved latest when we have migrated to
This also looks quite suspicious. rocks-edit.nvim doesn't have any submodules. And why is luarocks trying to use |
@mrcjkb Yes, your suspicions were correct. After taking the time to comb through my config more closely I found some autocmds that I'd been testing and forgot about that automatically configured the GIT_WORK_TREE and GIT_DIR based on CWD. :( Apologize sincerely for the time sink and noise - closing this issue. |
Glad to see it resolved 😄 |
Not sure if this is an issue to report to rocks.nvim or if it's from rocks-git.nvim.
It appears that using a bare repo setup for home dir is causing issues with how rocks (or maybe it rocks-git.nvim?) is cloning repos? Not sure what changed (I run nightly) as this used to work without issue prior to a couple of days ago.
See below for log from failed update attempt notice the
fatal: working tree '/home/ghost' already exists.
which is what clued me in to the potential? issueCurrent nvim version:
output of `:Rocks log` when running nvim from home dir
[START][2024-10-09 23:19:31] rocks.nvim logging initiated
WARN | 2024-10-09 23:20:08 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:234 | Could not parse latest tag from:
ERROR | 2024-10-09 23:20:08 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:266 | rocks-git: could not determine latest version for {
dir = "/home/ghost/.local/share/hotrocks/site/pack/rocks/start/care-cmp",
git = "max397574/care-cmp",
name = "care-cmp",
rev = "72cbb457e2ff246fd672d524270effe46f92ce4f",
url = "https://github.com/max397574/care-cmp.git"
}
WARN | 2024-10-09 23:20:09 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:234 | Could not parse latest tag from:
ERROR | 2024-10-09 23:20:09 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:266 | rocks-git: could not determine latest version for {
build = "make",
dir = "/home/ghost/.local/share/hotrocks/site/pack/rocks/start/telescope-fzf-native.nvim",
git = "nvim-telescope/telescope-fzf-native.nvim",
name = "telescope-fzf-native.nvim",
rev = "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b",
url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim.git"
}
WARN | 2024-10-09 23:20:09 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:234 | Could not parse latest tag from:
ERROR | 2024-10-09 23:20:09 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:266 | rocks-git: could not determine latest version for {
dir = "/home/ghost/.local/share/hotrocks/site/pack/rocks/opt/no-clown-fiesta",
git = "aktersnurra/no-clown-fiesta.nvim",
name = "no-clown-fiesta",
opt = true,
rev = "1685bbb47a409253f9145db56dd83ae117f9c382",
url = "https://github.com/aktersnurra/no-clown-fiesta.nvim.git"
}
ERROR | 2024-10-09 23:20:15 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:63 | luarocks CLI FAILED
ERROR | 2024-10-09 23:20:15 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:64 | fatal: working tree '/home/ghost' already exists.
Error: Failed cloning git repository.
ERROR | 2024-10-09 23:20:15 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install telescope.nvim
ERROR | 2024-10-09 23:20:15 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:77 | UPDATE ERROR: Failed to update telescope.nvim.
ERROR | 2024-10-09 23:20:23 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:63 | luarocks CLI FAILED
ERROR | 2024-10-09 23:20:23 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:64 | Warning: Failed searching manifest: Failed downloading https://nvim-neorocks.github.io/rocks-binaries/dev/manifest-5.1 - failed downloading https://nvim-neorocks.github.io/rocks-binaries/dev/manifest-5.1
fatal: working tree '/home/ghost' already exists.
Error: Failed cloning git repository.
ERROR | 2024-10-09 23:20:23 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install rocks-edit.nvim
ERROR | 2024-10-09 23:20:23 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:77 | UPDATE ERROR: Failed to update rocks-edit.nvim.
ERROR | 2024-10-09 23:20:32 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:63 | luarocks CLI FAILED
ERROR | 2024-10-09 23:20:32 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:64 | Warning: Failed searching manifest: Failed downloading https://nvim-neorocks.github.io/rocks-binaries/dev/manifest-5.1 - failed downloading https://nvim-neorocks.github.io/rocks-binaries/dev/manifest-5.1
fatal: working tree '/home/ghost' already exists.
Error: Failed cloning git repository.
ERROR | 2024-10-09 23:20:32 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install lush.nvim
ERROR | 2024-10-09 23:20:32 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:77 | UPDATE ERROR: Failed to update lush.nvim.
ERROR | 2024-10-09 23:20:32 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:177 | Update completed with errors! Run ':Rocks log' for details.
But if I change working directories prior to starting neovim, for instance to /tmp I am then able to run
Rocks update
without reported errors in the notification ui popup (see log below):output from `:Rocks log` when running nvim from /tmp
[START][2024-10-09 23:29:39] rocks.nvim logging initiated
WARN | 2024-10-09 23:29:57 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:234 | Could not parse latest tag from:
ERROR | 2024-10-09 23:29:57 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:266 | rocks-git: could not determine latest version for {
dir = "/home/ghost/.local/share/hotrocks/site/pack/rocks/start/care-cmp",
git = "max397574/care-cmp",
name = "care-cmp",
rev = "72cbb457e2ff246fd672d524270effe46f92ce4f",
url = "https://github.com/max397574/care-cmp.git"
}
WARN | 2024-10-09 23:29:58 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:234 | Could not parse latest tag from:
ERROR | 2024-10-09 23:29:58 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:266 | rocks-git: could not determine latest version for {
build = "make",
dir = "/home/ghost/.local/share/hotrocks/site/pack/rocks/start/telescope-fzf-native.nvim",
git = "nvim-telescope/telescope-fzf-native.nvim",
name = "telescope-fzf-native.nvim",
rev = "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b",
url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim.git"
}
WARN | 2024-10-09 23:29:59 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:234 | Could not parse latest tag from:
ERROR | 2024-10-09 23:29:59 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:266 | rocks-git: could not determine latest version for {
dir = "/home/ghost/.local/share/hotrocks/site/pack/rocks/opt/no-clown-fiesta",
git = "aktersnurra/no-clown-fiesta.nvim",
name = "no-clown-fiesta",
opt = true,
rev = "1685bbb47a409253f9145db56dd83ae117f9c382",
url = "https://github.com/aktersnurra/no-clown-fiesta.nvim.git"
}
The text was updated successfully, but these errors were encountered: