Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Vim-plug update step doesn't report errors #718

Open
Popkornium18 opened this issue May 26, 2021 · 6 comments
Open

Vim-plug update step doesn't report errors #718

Popkornium18 opened this issue May 26, 2021 · 6 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Popkornium18
Copy link

Popkornium18 commented May 26, 2021

I just realized that topgrade never upgraded my neovim plugins but still reported that everything went fine. It just says:

―― 11:57:34 - Neovim 
Plugins upgraded

However if I dry run topgrade and manually run the command (on Arch) this happens:

$ /usr/bin/nvim -u /home/user/.config/nvim/init.vim -U NONE -V1 -nNesS /tmp/.tmpKhasCa
not found in 'packpath': "pack/*/start/*"
not found in 'packpath': "pack/*/start/matchit"
not found in 'packpath': "pack/*/start/*"
not found in 'runtimepath': "plugin/**/*.vim"
Reading ShaDa file "/home/user/.local/share/nvim/shada/main.shada" info marks oldfiles
line 0: could not source "/tmp/.tmpKhasCa"
Error detected while processing command line:
E484: Can't open file /tmp/.tmpKhasCa
Entering Ex mode.  Type "visual" to go to Normal mode.
:
:
:
Writing ShaDa file "/home/user/.local/share/nvim/shada/main.shada"

Additional details:

  • Which operating system or Linux distribution are you using?
    Arch Linux and Ubuntu
  • How did you install Topgrade?
    On Arch from the AUR and on Ubuntu from GitHub. Both have the same issue.

On Ubuntu:

 2021-05-26T10:02:18.038Z DEBUG topgrade::steps::vim > Wrote vim script to "/tmp/.tmphsAwkQ"
not found in 'packpath': "pack/*/start/*"
not found in 'packpath': "pack/*/start/matchit"
not found in 'packpath': "pack/*/start/*"
not found in 'runtimepath': "plugin/**/*.vim"
Reading ShaDa file "/home/user/.local/share/nvim/shada/main.shada" info marks oldfiles
Plug
Downloading the latest version of vim-plugvim-plug is already up-to-date
not found in 'runtimepath': "ftplugin/vim-plug.vim ftplugin/vim-plug_*.vim ftplugin/vim-plug/*.vim"
not found in 'runtimepath': "indent/vim-plug.vim"
not found in 'runtimepath': "syntax/vim-plug.vim syntax/vim-plug/*.vim"Error detected while processing function 2_update[1]..2_update_impl[115]..2_nvim_cb[1]..2_job_cb[4]..2_job_out_cb[10]..2_log[4]..2_nvim_cb[1]..2_job_cb[4]..2_job_exit_cb[3]..2_reap[12]..2_bar:
line    3:
E440: undo line missingPlugins upgraded

On Arch:

 2021-05-26T10:03:21.931Z DEBUG topgrade::steps::vim       > Wrote vim script to "/tmp/.tmpxLfMDm"
not found in 'packpath': "pack/*/start/*"
not found in 'packpath': "pack/*/start/matchit"
not found in 'packpath': "pack/*/start/*"
not found in 'runtimepath': "plugin/**/*.vim"
Reading ShaDa file "/home/user/.local/share/nvim/shada/main.shada" info marks oldfiles
Plug
Downloading the latest version of vim-plugvim-plug is already up-to-date
not found in 'runtimepath': "ftplugin/vim-plug.vim ftplugin/vim-plug_*.vim ftplugin/vim-plug/*.vim"
not found in 'runtimepath': "indent/vim-plug.vim"
not found in 'runtimepath': "syntax/vim-plug.vim syntax/vim-plug/*.vim"Error detected while processing function 2_update[1]..2_update_impl[115]..2_nvim_cb[1]..2_job_cb[4]..2_job_out_cb[10]..2_log[4]..2_nvim_cb[1]..2_job_cb[4]..2_job_exit_cb[3]..2_reap[12]..2_bar:
line    3:
E440: undo line missingPlugins upgraded
@r-darwish
Copy link
Owner

The way Topgrade checks for failure is by checking the program's exit code, as it does for Vim too. If you're not seeing an error it means that Vim returned 0 dispite the failure. this is the Vim script used to upgrade packages. I'm not a Vim expert in any way. Does anyone know of a way to fix the script to cause Vim to return non-zero exist code on errors?

@r-darwish r-darwish added bug Something isn't working help wanted Extra attention is needed labels May 27, 2021
@SuperSandro2000
Copy link
Contributor

I am not sure why this sometimes fails. When I run topgrade --only vim it works but when I run it all together it doesn't.

@SuperSandro2000
Copy link
Contributor

I don't think the vim upgrade is failing but something is calling a git log (git log --pretty=format:%h HEAD...HEAD@{1}) which opens a prompt or an pager which is not closed. I can press y to retry as much as I want but no new processes are created but when I press once enter topgrade just continues.

@Corey-Keller
Copy link

Corey-Keller commented Sep 20, 2021

@r-darwish to exit with a non 0 exit status, use cq (see :help cq in vim), also, please see #756 for fixing issues with Packer specifically)

EDIT: @wbthomason #756 doesn't actually fix Packer (not for me at least).

@wbthomason
Copy link
Contributor

@Corey-Keller Can you elaborate (maybe over at #756)?

@Corey-Keller
Copy link

@wbthomason can done!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants