packer.nvim
packer.nvim copied to clipboard
Better to have an obvious prompt and suggestion when failed on git clone timeout
I was stuck with this problem for a long time. >_<
Is it possible to disable timeout ? I try to set clone_timeout to nil but still timeout at 60s.
I think nil
just deletes the key, so packer
uses the default value. Does setting clone_timeout
to false
work?
@nanotee It works, thank you. I was confused with nil in lua. now I get it.
still wish to have a obvious prompt when failed on timeout. It's hard to find reason from output.
@chaneyzorn Thanks for the report! I've added a simple warning output in the case that a timeout is triggered in f62f2fc - does that make it easier to debug?
@wbthomason I tested it and find a bug:
Error executing vim.schedule lua callback: ...nvim/site/pack/packer/opt/packer.nvim/lua/packer/log.lua:3: Vim(echomsg):E121: Undefined variable: git
it seems like vim.inspect(cmd)
return a string like this "git"
, then:
local echo_special = vim.schedule_wrap(function(msg, hl)
vim.cmd('echohl ' .. hl)
vim.cmd('echom "[packer] ' .. msg .. '"') -- here goes to echom "[packer] Killing "git" due to timeout!"
vim.cmd [[echohl None]]
end)
echom "[packer] Killing "git" due to timeout!"
@chaneyzorn: Whoops, thanks for the catch. I've removed the vim.inspect
call in 9f87f30, which hopefully fixes this bug.
@wbthomason It fixes the bug ~
But I noticed that another message will be print after git clone action finished, which scrolls up the echom output:
[packer] Killing git due to timeout!
remote/host: python3 host registered plugins []
remote/host: generated rplugin manifest: /home/chaney/.local/share/nvim/rplugin.vim
Only last one line would be noticed.
May it better to show message to the TUI:
Yes, this should be included in the final results report.
@chaneyzorn: Sorry, I realized that my last response was unclear - by "this should be included in the final results report", I meant that "I believe this is in the final results report already". If you press <cr>
on the failure to install line, does it not show you more information explaining that there was a timeout?
If not, I can add a more descriptive message to the results table and/or auto-expand the failure results like we do for the successful update results.
@wbthomason It dosen't show the timeout.
I can only see the timeout msg by using :messages
.
👋🏻
I opened an issue related to clone_timeout
here:
https://github.com/mrjones2014/dash.nvim/issues/138
I tried setting clone_timeout = false
but that didn't help and running :PackerSync
still caused the clone to timeout.
return require("packer").startup({
function()
use "wbthomason/package.nvim"
use { "mrjones2014/dash.nvim", run = "make install" }
end,
config = {
clone_timeout = false
}
})
@Integralist I faced similar issues installing different packages, I set clone_timeout to a very large number and it worked. nil
or false
doesn't seem to be recognized.