lewis6991 / pckr.nvim

Spiritual successor of https://github.com/wbthomason/packer.nvim
MIT License
241 stars 12 forks source link

First Install Error Spam "git.lua:131: Unexpected output" #25

Closed alex-courtis closed 4 weeks ago

alex-courtis commented 1 month ago

Alex from nvim-tree here. Many thanks for putting together this fantastic plugin manager - it's the minimalistic one we've all been looking for.

: ; nvim --version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1720049189
Run "nvim -V1 -v" for more info
: ; git --version
git version 2.45.2
: ; uname -a
Linux emperor 6.9.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 05 Jul 2024 22:11:24 +0000 x86_64 GNU/Linux
: ; alacritty --version
alacritty 0.13.2 (bb8ea18e)

Steps to reproduce

init.lua.gz

rm -rf /tmp/nvim-pckr-test
nvim -nu /path/to/init.lua

Actual behaviour

printed at startup

[pckr.nvim[ERROR 13:23:27] git.lua:136: ...m-pckr-test/pckr/pckr.nvim/lua/pckr/plugin_types/git.lua:131: Unexpected output:
[pckr.nvim[ERROR 13:23:27] git.lua:136: ...m-pckr-test/pckr/pckr.nvim/lua/pckr/plugin_types/git.lua:131: Unexpected output:
Press ENTER or type command to continue
[pckr.nvim[ERROR 13:23:29] git.lua:136: ...m-pckr-test/pckr/pckr.nvim/lua/pckr/plugin_types/git.lua:131: Unexpected output:
Press ENTER or type command to continue
...
...
...

See :Pckr log plog.gz

Plugins apparently load OK but it's hard to be sure. A sync after restarting seems OK.

Expected behaviour

No errors.

lewis6991 commented 1 month ago

The init.lua works fine for me.

What output do you get with:

vim.system({'git', '-c', 'advice.diverging=false', '-c', 'advice.resolveConflict=false', '--version'}):wait()

From your output, it looks like that is returning an empty string.

Gitsigns runs similar code, so I'm surprised you've not seen this error in that.

alex-courtis commented 1 month ago

Thanks for getting back to me Lewis

I'll do some further testing on the weekend.

On Mon, 15 July 2024, 19:36 Lewis Russell, @.***> wrote:

The init.lua works fine for me.

What output do you get with:

vim.system({'git', '-c', 'advice.diverging=false', '-c', 'advice.resolveConflict=false', '--version'}):wait()

From your output, it looks like that is returning an empty string.

— Reply to this email directly, view it on GitHub https://github.com/lewis6991/pckr.nvim/issues/25#issuecomment-2228080591, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALPQYV46QCSI76M5FAPCTDZMOJYRAVCNFSM6AAAAABKZ43QNKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRYGA4DANJZGE . You are receiving this because you authored the thread.Message ID: @.***>

alex-courtis commented 1 month ago

nvim --clean

test 1: :lua vim.system({'git', '-c', 'advice.diverging=false', '-c', 'advice.resolveConflict=false', '--version'}):wait() No output, not really expecting any.

test 2: :lua print(vim.inspect(vim.system({'git', '-c', 'advice.diverging=false', '-c', 'advice.resolveConflict=false', '--version'}):wait()))

{
  code = 0,
  signal = 0,
  stderr = "",
  stdout = "git version 2.45.2\n"
}

Is the newline expected?

test 3: :lua print(vim.inspect(vim.fn.system({'git', '-c', 'advice.diverging=false', '-c', 'advice.resolveConflict=false', '--version'})))

"git version 2.45.2\n"
lewis6991 commented 1 month ago

Ok my only guess is that the problem lies in the async lib. I'm not sure how to proceed. This same code is used in Gitsigns so I'm surprised one works and the other doesn't.

alex-courtis commented 4 weeks ago

No worries. I'll reduce concurrency and see how it behaves.

I'll reopen if it becomes a larger problem.