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

bare repo setup user home directory appears to interfere with rocks update/sync #554

Closed
CarbonChauvinist opened this issue Oct 10, 2024 · 9 comments

Comments

@CarbonChauvinist
Copy link

CarbonChauvinist commented Oct 10, 2024

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? issue

Current nvim version:

NVIM v0.11.0-dev-941+gcd8e15e337
Build type: Release
LuaJIT 2.1.1725453128
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"
}

@mrcjkb
Copy link
Member

mrcjkb commented Oct 10, 2024

Hey 👋

This looks like it could be related to #312.
I haven't been able to reproduce it yet.
Are you able to reproduce it consistently?

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.

This definitely looks like it's a rocks-git.nvim issue.
It seems like the bare repo is interfering with the git clone command. Perhaps that can be worked around by setting the cwd of the vim.system call to some other (temporary) directory. 🤔
I'm away from my laptop now, but I'll look into it when I'm near it again.

@CarbonChauvinist
Copy link
Author

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. :cd) and then reran :Rocks update with the same outcome.

However, testing now and yes as long as I'm not in the config directory (~/.config/hotrocks/) when starting nvim the errors don't appear.

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
WARN | 2024-10-12 09:26:17 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:234 | Could not parse latest tag from:
ERROR | 2024-10-12 09:26:17 | ...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"
}
WARN | 2024-10-12 09:26:18 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:234 | Could not parse latest tag from:
ERROR | 2024-10-12 09:26:18 | ...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-12 09:26:20 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:234 | Could not parse latest tag from:
ERROR | 2024-10-12 09:26:20 | ...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"
}

Other things to note after reading through #312 :

  • I also am using NVIM_APPNAME as I'm working to transition from lazy to rocks
  • I also have a bare repo home directory setup
  • I also am using hotpot.nvim

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 path

export 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'
export LUA_CPATH='/usr/local/lib/lua/5.4/?.so;/usr/lib/lua/5.4/?.so;/usr/local/lib/lua/5.4/loadall.so;/usr/lib/lua/5.4/loadall.so;./?.so;/home/ghost/.luarocks/lib/lua/5.4/?.so'
export PATH='/home/ghost/.luarocks/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/ghost/.local/bin:/home/ghost/.local/bin/scripts:/home/ghost/.node_modules/bin:/home/ghost/go/bin:/home/ghost/.cargo/bin:/home/ghost/.local/share/gem/ruby/3.2.0/bin'

Is there a way to get more verbose logging in rocks log?

@mrcjkb
Copy link
Member

mrcjkb commented Oct 14, 2024

I've just released a new version of rocks-git.nvim with a potential fix that sets the vim.system's cwd when cloning repositories:

Could you please let me know if this solves your issue?

@CarbonChauvinist
Copy link
Author

Thanks. I've tried "rocks-git.nvim" = "2.3.2" and unfortunately, the same issue still persists (see log below for reference). It's important to highlight that the issue only seems to occur when I start nvim from my config directory. If I change directories from my config and start nvim I'm able to run sync or update.

rocks log when running `:Rocks update` in config directory

[START][2024-10-15 22:10:51] rocks.nvim logging initiated
WARN | 2024-10-15 22:11:03 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:238 | Could not parse latest tag from:
ERROR | 2024-10-15 22:11:03 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:270 | 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"
}
WARN | 2024-10-15 22:11:04 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:238 | Could not parse latest tag from:
ERROR | 2024-10-15 22:11:04 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:270 | 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-15 22:11:05 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:238 | Could not parse latest tag from:
ERROR | 2024-10-15 22:11:05 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:270 | 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"
}
ERROR | 2024-10-15 22:11:18 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:63 | luarocks CLI FAILED
ERROR | 2024-10-15 22:11:18 | ...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-15 22:11:18 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install rocks-edit.nvim
ERROR | 2024-10-15 22:11:18 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:77 | UPDATE ERROR: Failed to update rocks-edit.nvim.
ERROR | 2024-10-15 22:11:26 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:63 | luarocks CLI FAILED
ERROR | 2024-10-15 22:11:26 | ...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-15 22:11:26 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install lush.nvim
ERROR | 2024-10-15 22:11:26 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:77 | UPDATE ERROR: Failed to update lush.nvim.
ERROR | 2024-10-15 22:11:29 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:63 | luarocks CLI FAILED
ERROR | 2024-10-15 22:11:29 | ...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-15 22:11:29 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install telescope.nvim
ERROR | 2024-10-15 22:11:29 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:77 | UPDATE ERROR: Failed to update telescope.nvim.
ERROR | 2024-10-15 22:11:36 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:63 | luarocks CLI FAILED
ERROR | 2024-10-15 22:11:36 | ...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-15 22:11:36 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install express_line.nvim
ERROR | 2024-10-15 22:11:36 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:77 | UPDATE ERROR: Failed to update express_line.nvim.

rocks log when running `:Rocks sync` in config directory

[START][2024-10-15 22:21:12] rocks.nvim logging initiated
ERROR | 2024-10-15 22:21:19 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:145 | {
code = 128,
signal = 0,
stderr = "ssh_askpass: exec(/usr/lib/ssh/ssh-askpass): No such file or directory\r\[email protected]: Permission denied (publickey,password,keyboard-interactive).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n",
stdout = ""
}
WARN | 2024-10-15 22:21:19 | ...re/hotrocks/rocks/rocks_rtp/lua/rocks-git/operations.lua:152 | rocks-git: Error while fetching package updates during sync
ERROR | 2024-10-15 22:21:19 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:115 | {
code = 1,
signal = 0,
stderr = "error: pathspec 'v1.0.0' did not match any file(s) known to git\n",
stdout = ""
}
ERROR | 2024-10-15 22:21:19 | ...e/hotrocks/rocks/rocks_rtp/lua/rocks/operations/sync.lua:48 | SYNC ERROR: rocks-git: Failed to checkout v1.0.0
ERROR | 2024-10-15 22:21:21 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:145 | {
code = 128,
signal = 0,
stderr = "ssh_askpass: exec(/usr/lib/ssh/ssh-askpass): No such file or directory\r\[email protected]: Permission denied (publickey,password,keyboard-interactive).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n",
stdout = ""
}
WARN | 2024-10-15 22:21:21 | ...re/hotrocks/rocks/rocks_rtp/lua/rocks-git/operations.lua:152 | rocks-git: Error while fetching package updates during sync
ERROR | 2024-10-15 22:21:21 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:115 | {
code = 1,
signal = 0,
stderr = "error: pathspec 'v4.3.5' did not match any file(s) known to git\n",
stdout = ""
}
ERROR | 2024-10-15 22:21:21 | ...e/hotrocks/rocks/rocks_rtp/lua/rocks/operations/sync.lua:48 | SYNC ERROR: rocks-git: Failed to checkout v4.3.5
ERROR | 2024-10-15 22:21:22 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:145 | {
code = 128,
signal = 0,
stderr = "ssh_askpass: exec(/usr/lib/ssh/ssh-askpass): No such file or directory\r\[email protected]: Permission denied (publickey,password,keyboard-interactive).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n",
stdout = ""
}
WARN | 2024-10-15 22:21:22 | ...re/hotrocks/rocks/rocks_rtp/lua/rocks-git/operations.lua:152 | rocks-git: Error while fetching package updates during sync
ERROR | 2024-10-15 22:21:22 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:115 | {
code = 128,
signal = 0,
stderr = "fatal: unable to read tree (cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b)\n",
stdout = ""
}
ERROR | 2024-10-15 22:21:22 | ...e/hotrocks/rocks/rocks_rtp/lua/rocks/operations/sync.lua:48 | SYNC ERROR: rocks-git: Failed to checkout cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b
ERROR | 2024-10-15 22:21:24 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:145 | {
code = 128,
signal = 0,
stderr = "ssh_askpass: exec(/usr/lib/ssh/ssh-askpass): No such file or directory\r\[email protected]: Permission denied (publickey,password,keyboard-interactive).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n",
stdout = ""
}
WARN | 2024-10-15 22:21:24 | ...re/hotrocks/rocks/rocks_rtp/lua/rocks-git/operations.lua:152 | rocks-git: Error while fetching package updates during sync
ERROR | 2024-10-15 22:21:24 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:115 | {
code = 1,
signal = 0,
stderr = "error: pathspec 'v1.1.0^{}' did not match any file(s) known to git\n",
stdout = ""
}
ERROR | 2024-10-15 22:21:24 | ...e/hotrocks/rocks/rocks_rtp/lua/rocks/operations/sync.lua:48 | SYNC ERROR: rocks-git: Failed to checkout v1.1.0^{}
ERROR | 2024-10-15 22:21:40 | ...e/hotrocks/rocks/rocks_rtp/lua/rocks/operations/sync.lua:268 | Sync completed with errors! Run ':Rocks log' for details.

Again the log from the :Rocks sync attempt point to somehow my bare repo interfering. My origin for the bare repo is hosted on sr.ht

~/.config/hotrocks $ type -a dotz
dotz is an alias for /usr/bin/git --work-tree=$HOME --git-dir=$HOME/.config/dotz/
dotz is /home/ghost/.local/bin/scripts/dotz

~/.config/hotrocks $ dotz remote -vv
origin  [email protected]:~carbonchauvinist/dotz (fetch)
origin  [email protected]:~carbonchauvinist/dotz (push)

Lastly, just to confirm starting nvim from my config directory and then changing nvim's working directory from within nvim itself (i.e. :cd ~) does not have any effect and still have the same errors when running rock update/sync. I have to change the actual working directory prior to starting nvim.

@mrcjkb
Copy link
Member

mrcjkb commented Oct 16, 2024

ERROR | 2024-10-15 22:11:18 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:63 | luarocks CLI FAILED
ERROR | 2024-10-15 22:11:18 | ...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.

🤔 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 rocks_dir when invoking luarocks. Perhaps that will solve it.

@CarbonChauvinist
Copy link
Author

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
WARN | 2024-10-17 08:21:30 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:238 | Could not parse latest tag from:
ERROR | 2024-10-17 08:21:30 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:270 | 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-17 08:21:31 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:238 | Could not parse latest tag from:
ERROR | 2024-10-17 08:21:31 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:270 | 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-17 08:21:32 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:238 | Could not parse latest tag from:
ERROR | 2024-10-17 08:21:32 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:270 | 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-17 08:21:38 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:65 | luarocks CLI FAILED
ERROR | 2024-10-17 08:21:38 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:66 | fatal: working tree '/home/ghost' already exists.

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 | 2024-10-17 08:21:38 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:77 | UPDATE ERROR: Failed to update telescope.nvim.
ERROR | 2024-10-17 08:21:45 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:65 | luarocks CLI FAILED
ERROR | 2024-10-17 08:21:45 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:66 | 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-17 08:21:45 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install rocks-edit.nvim
ERROR | 2024-10-17 08:21:45 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:77 | UPDATE ERROR: Failed to update rocks-edit.nvim.
ERROR | 2024-10-17 08:21:51 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:65 | luarocks CLI FAILED
ERROR | 2024-10-17 08:21:51 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:66 | 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-17 08:21:51 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install lush.nvim
ERROR | 2024-10-17 08:21:51 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:77 | UPDATE ERROR: Failed to update lush.nvim.
ERROR | 2024-10-17 08:21:58 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:65 | luarocks CLI FAILED
ERROR | 2024-10-17 08:21:58 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:66 | 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-17 08:21:58 | ...otrocks/rocks/rocks_rtp/lua/rocks/operations/helpers.lua:93 | Failed to install express_line.nvim
ERROR | 2024-10-17 08:21:58 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:77 | UPDATE ERROR: Failed to update express_line.nvim.
ERROR | 2024-10-17 08:21:58 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:177 | Update completed with errors! Run ':Rocks log' for details.

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 directory

ATUIN_HISTORY_ID=01929a7cf842747f98bce004dbb905dd
ATUIN_SESSION=01929a61487d7c569739dbebaa527cc8
AURDEST=/pkg/aur/aurutils/sync
CHROOT=/home/ghost/chroot
COLORTERM=truecolor
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
DELTA_PAGER=less
DESKTOP_SESSION=gnome
DISPLAY=:0
EDITOR=/usr/bin/nvim
FZF_DEFAULT_OPTS=
--color=fg:-1,fg+:#41c7b9,bg:-1,bg+:#184956
--color=hl:#5f87af,hl+:#75b938,info:#afaf87,marker:#fa5750
--color=prompt:#00d624,spinner:#af88eb,pointer:#bd96fa,header:#87afaf
--color=border:#103c48,label:#aeaeae,query:#d9d9d9
--border="rounded" --border-label="" --preview-window="border-rounded" --prompt="> "
--marker=">" --pointer="◆" --separator="─" --scrollbar="│"
--color=fg:-1,fg+:#41c7b9,bg:-1,bg+:#184956
--color=hl:#5f87af,hl+:#75b938,info:#afaf87,marker:#fa5750
--color=prompt:#00d624,spinner:#af88eb,pointer:#bd96fa,header:#87afaf
--color=border:#103c48,label:#aeaeae,query:#d9d9d9
--border="rounded" --border-label="" --preview-window="border-rounded" --prompt="> "
--marker=">" --pointer="◆" --separator="─" --scrollbar="│"
--color=fg:-1,fg+:#41c7b9,bg:-1,bg+:#184956
--color=hl:#5f87af,hl+:#75b938,info:#afaf87,marker:#fa5750
--color=prompt:#00d624,spinner:#af88eb,pointer:#bd96fa,header:#87afaf
--color=border:#103c48,label:#aeaeae,query:#d9d9d9
--border="rounded" --border-label="" --preview-window="border-rounded" --prompt="> "
--marker=">" --pointer="◆" --separator="─" --scrollbar="│"
GDMSESSION=gnome
GDM_LANG=en_US.UTF-8
GEM_HOME=/home/ghost/.local/share/gem/ruby/3.3.0
GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/org.codeberg.dnkl.foot.desktop
GIO_LAUNCHED_DESKTOP_FILE_PID=6092
GJS_DEBUG_OUTPUT=stderr
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
GNOME_SETUP_DISPLAY=:1
HG=/usr/bin/hg
HOME=/home/ghost
INVOCATION_ID=385f429ce23a4d3585d5a7fedace0318
JOURNAL_STREAM=9:11340
LANG=en_US.UTF-8
LIBVA_DRIVERS_PATH=/usr/lib/dri
LIBVA_DRIVER_NAME=iHD
LOGNAME=ghost
MAIL=/var/spool/mail/ghost
MANAGERPID=1261
MANPAGER=/usr/bin/nvimpager
MANWIDTH=999
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/[email protected]/memory.pressure
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
MOTD_SHOWN=pam
MOZ_ENABLE_WAYLAND=1
OLDPWD=/home/ghost
PAGER=/usr/bin/nvimpager
PATH=/home/ghost/.local/share/hotrocks/rocks/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/ghost/.local/bin:/home/ghost/.local/bin/scripts:/home/ghost/.node_modules/bin:/home/ghost/go/bin:/home/ghost/.cargo/bin:/home/ghost/.local/share/gem/ruby/3.3.0/bin
PWD=/home/ghost
QT_QPA_PLATFORM=wayland
RIPGREP_CONFIG_PATH=/home/ghost/.config/rg/.ripgreprc
SESSION_MANAGER=local/lap:@/tmp/.ICE-unix/1358,unix/lap:/tmp/.ICE-unix/1358
SHELL=/usr/bin/zsh
SHLVL=2
SKIM_DEFAULT_COMMAND=/usr/bin/rg --files --hidden --no-require-git
SSH_AUTH_SOCK=/run/user/1000/ssh-agent.socket
SYSTEMD_EXEC_PID=1380
TERM=foot-extra-git
USER=ghost
USERNAME=ghost
WAYLAND_DISPLAY=wayland-0
XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.NJI0V2
XDG_CONFIG_HOME=/home/ghost/.config
XDG_CURRENT_DESKTOP=GNOME
XDG_DATA_DIRS=/home/ghost/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/
XDG_MENU_PREFIX=gnome-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=gnome
XDG_SESSION_TYPE=wayland
ZELLIJ=0
ZELLIJ_PANE_ID=0
ZELLIJ_SESSION_NAME=joyous-crab
_=/usr/bin/printenv
npm_config_prefix=/home/ghost/.node_modules
NVIM_APPNAME=hotrocks
VIMRUNTIME=/usr/share/nvim/runtime
NVIM_LOG_FILE=/home/ghost/.local/state/hotrocks/log
MYVIMRC=/home/ghost/.config/hotrocks/init.lua
LUAROCKS_CONFIG=/home/ghost/.local/share/hotrocks/rocks/luarocks-config.lua

`tabnew | r !printenv` when starting with NVIM_APPNAME from config directory (notice the extra env variables at the end of the list

ATUIN_HISTORY_ID=01929a7a275577449ce4cae237fea825
ATUIN_SESSION=01929a61487d7c569739dbebaa527cc8
AURDEST=/pkg/aur/aurutils/sync
CHROOT=/home/ghost/chroot
COLORTERM=truecolor
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
DELTA_PAGER=less
DESKTOP_SESSION=gnome
DISPLAY=:0
EDITOR=/usr/bin/nvim
FZF_DEFAULT_OPTS=
--color=fg:-1,fg+:#41c7b9,bg:-1,bg+:#184956
--color=hl:#5f87af,hl+:#75b938,info:#afaf87,marker:#fa5750
--color=prompt:#00d624,spinner:#af88eb,pointer:#bd96fa,header:#87afaf
--color=border:#103c48,label:#aeaeae,query:#d9d9d9
--border="rounded" --border-label="" --preview-window="border-rounded" --prompt="> "
--marker=">" --pointer="◆" --separator="─" --scrollbar="│"
--color=fg:-1,fg+:#41c7b9,bg:-1,bg+:#184956
--color=hl:#5f87af,hl+:#75b938,info:#afaf87,marker:#fa5750
--color=prompt:#00d624,spinner:#af88eb,pointer:#bd96fa,header:#87afaf
--color=border:#103c48,label:#aeaeae,query:#d9d9d9
--border="rounded" --border-label="" --preview-window="border-rounded" --prompt="> "
--marker=">" --pointer="◆" --separator="─" --scrollbar="│"
--color=fg:-1,fg+:#41c7b9,bg:-1,bg+:#184956
--color=hl:#5f87af,hl+:#75b938,info:#afaf87,marker:#fa5750
--color=prompt:#00d624,spinner:#af88eb,pointer:#bd96fa,header:#87afaf
--color=border:#103c48,label:#aeaeae,query:#d9d9d9
--border="rounded" --border-label="" --preview-window="border-rounded" --prompt="> "
--marker=">" --pointer="◆" --separator="─" --scrollbar="│"
GDMSESSION=gnome
GDM_LANG=en_US.UTF-8
GEM_HOME=/home/ghost/.local/share/gem/ruby/3.3.0
GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/org.codeberg.dnkl.foot.desktop
GIO_LAUNCHED_DESKTOP_FILE_PID=6092
GJS_DEBUG_OUTPUT=stderr
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
GNOME_SETUP_DISPLAY=:1
HG=/usr/bin/hg
HOME=/home/ghost
INVOCATION_ID=385f429ce23a4d3585d5a7fedace0318
JOURNAL_STREAM=9:11340
LANG=en_US.UTF-8
LIBVA_DRIVERS_PATH=/usr/lib/dri
LIBVA_DRIVER_NAME=iHD
LOGNAME=ghost
MAIL=/var/spool/mail/ghost
MANAGERPID=1261
MANPAGER=/usr/bin/nvimpager
MANWIDTH=999
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/[email protected]/memory.pressure
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
MOTD_SHOWN=pam
MOZ_ENABLE_WAYLAND=1
OLDPWD=/home/ghost/.config/hotrocks
PAGER=/usr/bin/nvimpager
PATH=/home/ghost/.local/share/hotrocks/rocks/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/ghost/.local/bin:/home/ghost/.local/bin/scripts:/home/ghost/.node_modules/bin:/home/ghost/go/bin:/home/ghost/.cargo/bin:/home/ghost/.local/share/gem/ruby/3.3.0/bin
PWD=/home/ghost/.config/hotrocks
QT_QPA_PLATFORM=wayland
RIPGREP_CONFIG_PATH=/home/ghost/.config/rg/.ripgreprc
SESSION_MANAGER=local/lap:@/tmp/.ICE-unix/1358,unix/lap:/tmp/.ICE-unix/1358
SHELL=/usr/bin/zsh
SHLVL=2
SKIM_DEFAULT_COMMAND=/usr/bin/rg --files --hidden --no-require-git
SSH_AUTH_SOCK=/run/user/1000/ssh-agent.socket
SYSTEMD_EXEC_PID=1380
TERM=foot-extra-git
USER=ghost
USERNAME=ghost
WAYLAND_DISPLAY=wayland-0
XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.NJI0V2
XDG_CONFIG_HOME=/home/ghost/.config
XDG_CURRENT_DESKTOP=GNOME
XDG_DATA_DIRS=/home/ghost/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/
XDG_MENU_PREFIX=gnome-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=gnome
XDG_SESSION_TYPE=wayland
ZELLIJ=0
ZELLIJ_PANE_ID=0
ZELLIJ_SESSION_NAME=joyous-crab
_=/usr/bin/printenv
npm_config_prefix=/home/ghost/.node_modules
NVIM_APPNAME=hotrocks
VIMRUNTIME=/usr/share/nvim/runtime
NVIM_LOG_FILE=/home/ghost/.local/state/hotrocks/log
MYVIMRC=/home/ghost/.config/hotrocks/init.lua
LUAROCKS_CONFIG=/home/ghost/.local/share/hotrocks/rocks/luarocks-config.lua
GIT_WORK_TREE=/home/ghost
GIT_DIR=/home/ghost/.config/dotz

And a cleaner diff view of the output from both (focusing only on the two new env variables)

~ $ diff from-home from-config
2c2
< ATUIN_HISTORY_ID=01929a7cf842747f98bce004dbb905dd
---
> ATUIN_HISTORY_ID=01929a7ea6117977a00d30ad6b24a58e
56c56
< OLDPWD=/home/ghost
---
> OLDPWD=/home/ghost/.config/hotrocks
59c59
< PWD=/home/ghost
---
> PWD=/home/ghost/.config/hotrocks
90a91,92
> GIT_WORK_TREE=/home/ghost
> GIT_DIR=/home/ghost/.config/dotz

If I then try to unset the work tree using := vim.uv.os_unsetenv("GIT_WORK_TREE") and verify it's no longer set with := vim.uv.os_environ() I run into different errors about being unable to fetch submodules and submodules can't be used without a working tree (see rocks log output below):

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
WARN | 2024-10-17 08:49:19 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:238 | Could not parse latest tag from:
ERROR | 2024-10-17 08:49:19 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:270 | 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-17 08:49:21 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:238 | Could not parse latest tag from:
ERROR | 2024-10-17 08:49:21 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:270 | 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"
}
WARN | 2024-10-17 08:49:21 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:238 | Could not parse latest tag from:
ERROR | 2024-10-17 08:49:21 | ...cal/share/hotrocks/rocks/rocks_rtp/lua/rocks-git/git.lua:270 | 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"
}
ERROR | 2024-10-17 08:49:29 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:65 | luarocks CLI FAILED
ERROR | 2024-10-17 08:49:29 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:66 | 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
Cloning into 'rocks-edit.nvim'...
fatal: /usr/lib/git-core/git-submodule cannot be used without a working tree.

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 | 2024-10-17 08:49:29 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:77 | UPDATE ERROR: Failed to update rocks-edit.nvim.
ERROR | 2024-10-17 08:49:36 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:65 | luarocks CLI FAILED
ERROR | 2024-10-17 08:49:36 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:66 | 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
Cloning into 'express_line.nvim'...
fatal: /usr/lib/git-core/git-submodule cannot be used without a working tree.

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 | 2024-10-17 08:49:36 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:77 | UPDATE ERROR: Failed to update express_line.nvim.
ERROR | 2024-10-17 08:49:40 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:65 | luarocks CLI FAILED
ERROR | 2024-10-17 08:49:40 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:66 | Cloning into 'telescope.nvim'...
fatal: /usr/lib/git-core/git-submodule cannot be used without a working tree.

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 | 2024-10-17 08:49:40 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:77 | UPDATE ERROR: Failed to update telescope.nvim.
ERROR | 2024-10-17 08:49:48 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:65 | luarocks CLI FAILED
ERROR | 2024-10-17 08:49:48 | ...al/share/hotrocks/rocks/rocks_rtp/lua/rocks/luarocks.lua:66 | 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
Cloning into 'lush.nvim'...
fatal: /usr/lib/git-core/git-submodule cannot be used without a working tree.

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
ERROR | 2024-10-17 08:49:48 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:77 | UPDATE ERROR: Failed to update lush.nvim.
ERROR | 2024-10-17 08:49:48 | ...hotrocks/rocks/rocks_rtp/lua/rocks/operations/update.lua:177 | Update completed with errors! Run ':Rocks log' for details.

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.

@mrcjkb
Copy link
Member

mrcjkb commented Oct 17, 2024

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):

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 rocks, see


Cloning into 'rocks-edit.nvim'...
fatal: /usr/lib/git-core/git-submodule cannot be used without a working tree.

Error: Failed to fetch submodules.

This also looks quite suspicious. rocks-edit.nvim doesn't have any submodules. And why is luarocks trying to use /usr/lib/git-core/git-submodule? 🤔

@CarbonChauvinist
Copy link
Author

@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.

@mrcjkb
Copy link
Member

mrcjkb commented Oct 21, 2024

Glad to see it resolved 😄
No need to apologise for asking for help.

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

2 participants