SuperBo / fugit2.nvim

Neovim git GUI powered by libgit2
MIT License
333 stars 7 forks source link

bug: installation fails on Windows nvim. Using with AstroNvim. #82

Open saumyajyoti opened 1 week ago

saumyajyoti commented 1 week ago

Did you check docs and existing issues?

Neovim version (nvim -v)

NVIM v0.10.0

Operating system/version

Win 11 23H2

Describe the bug

Get build error as below:

fugit2.nvim Installing https://luarocks.org/fugit2.nvim-0.2.0-1.src.rock 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

Steps To Reproduce

  1. Use with nvim via Lazy nvim
  2. install spec: https://github.com/AstroNvim/astrocommunity/blob/main/lua/astrocommunity/git/fugit2-nvim/init.lua

Expected Behavior

The install and build should pass. Seeing this error recently, it used to work few weeks earlier.

SuperBo commented 1 week ago

@saumyajyoti, did AstroNvim use rocks.nvim, why it report error about rocks?

saumyajyoti commented 1 week ago

Hi @SuperBo , No it uses lazy.nvim.

SuperBo commented 1 week ago

Are you using WSL or native windows shell? If you could provide me some screenshots and detail log, it would be helpful.

ZhichaoHong commented 1 day ago

I got similar error on windows 10 with astrnvim/nvim 0.10 image

SuperBo commented 18 hours ago

@ZhichaoHong, for temporarily fix, can you copy libgit2.dll or libgit2.lib to C:\external\lib?

ZhichaoHong commented 6 hours ago

I copied the libgit2.dll in the c:\windows\system32. It still failed with the following error as below. It feels like the installation is trying to run git in a bash (basename, sed, etc) environment. But my default shell in neovim is still cmd.exe. ○ fugit2.nvim  Fugit2  Fugit2Graph 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 'nui.nvim'... C:/Program Files/Git/mingw64/libexec/git-core\git-submodule: line 7: basename: command not found C:/Program Files/Git/mingw64/libexec/git-core\git-submodule: line 7: sed: command not found C:/Program Files/Git/mingw64/libexec/git-core\git-submodule: line 22: .: git-sh-setup: file not found

    Error: Failed installing dependency: https://luarocks.org/dev/nui.nvim-dev-1.rockspec - Failed to fetch submodules.
    Installing https://luarocks.org/fugit2.nvim-0.2.1-1.src.rock
    Missing dependencies for fugit2.nvim 0.2.1-1:
       nui.nvim (not installed)
       nvim-web-devicons (not installed)
       plenary.nvim (not installed)

    fugit2.nvim 0.2.1-1 depends on lua >= 5.1 (5.1-1 provided by VM: success)
    fugit2.nvim 0.2.1-1 depends on nui.nvim (not installed)
    Installing https://luarocks.org/dev/nui.nvim-dev-1.rockspec
    Failed installing fugit2.nvim with `luarocks`.

    --------------------------------------------------------------------------------

    Trying to build from source.
    Cloning into 'nui.nvim'...
    C:/Program Files/Git/mingw64/libexec/git-core\git-submodule: line 7: basename: command not found
    C:/Program Files/Git/mingw64/libexec/git-core\git-submodule: line 7: sed: command not found
    C:/Program Files/Git/mingw64/libexec/git-core\git-submodule: line 22: .: git-sh-setup: file not found

    Error: Failed installing dependency: https://luarocks.org/dev/nui.nvim-dev-1.rockspec - Failed to fetch submodules.
    Missing dependencies for fugit2.nvim scm-1:
       nui.nvim (not installed)
       nvim-web-devicons (not installed)
       plenary.nvim (not installed)
saumyajyoti commented 4 hours ago

@SuperBo , I am using Windows native shell. libgit2 is in path. The screenshot /error is same as @ZhichaoHong mentioned above.