topgrade-rs / topgrade

Upgrade all the things
GNU General Public License v3.0
1.94k stars 127 forks source link

vim update failed #534

Open reini-1 opened 1 year ago

reini-1 commented 1 year ago

Erroneous Behavior

vim update fails since some time

Expected Behavior

vim update works without failure

Steps to reproduce

topgrade or topgrade --only vim or topgrade --config /dev/null or topgrade --config /dev/null --only vim

Possible Cause (Optional)

Problem persists without calling from topgrade

Did you run topgrade through Remote Execution

If yes, does the issue still occur when you run topgrade directlly in your remote host

Configuration file (Optional)

no with --config /dev/null also the same error

Additional Details

same result also with older versions, I tested: topgrade-v11.0.1-x86_64-apple-darwin.tar.gz topgrade-v11.0.2-x86_64-apple-darwin.tar.gz topgrade-v12.0.0-x86_64-apple-darwin.tar.gz topgrade-v12.0.1-x86_64-apple-darwin.tar.gz

Verbose Output (topgrade -v)

✓ macOS-13.5> username@hostname ~/tmp/topgrade % RUST_BACKTRACE=full COLORBT_SHOW_HIDDEN=1 topgrade --config /dev/null --only vim --verbose
DEBUG Adding [misc] section to /dev/null
DEBUG Loaded configuration: ConfigFile { include: None, misc: Some(Misc { pre_sudo: None, sudo_command: None, git_repos: None, predefined_git_repos: None, disable: None, ignore_failures: None, remote_topgrades: None, remote_topgrade_path: None, ssh_arguments: None, git_arguments: None, tmux_arguments: None, set_title: None, display_time: None, assume_yes: None, yay_arguments: None, aura_aur_arguments: None, aura_pacman_arguments: None, no_retry: None, run_in_tmux: None, cleanup: None, notify_each_step: None, accept_all_windows_updates: None, skip_notify: None, bashit_branch: None, only: None, no_self_update: None }), pre_commands: None, post_commands: None, commands: None, python: None, composer: None, brew: None, linux: None, git: None, windows: None, npm: None, yarn: None, vim: None, firmware: None, vagrant: None, flatpak: None, distrobox: None }
DEBUG Version: 12.0.2
DEBUG OS: aarch64-apple-darwin
DEBUG Args { inner: ["topgrade", "--config", "/dev/null", "--only", "vim", "--verbose"] }
DEBUG Binary path: Ok("/opt/homebrew/bin/topgrade")
DEBUG Self Update: false
DEBUG Detected "/Users/username/bin/shims/git" as "git"
DEBUG Detected "/usr/local/bin/pwsh" as "pwsh"
DEBUG Executing command `/usr/local/bin/pwsh -NoProfile -Command 'Split-Path $profile'`
DEBUG Path "/Users/username/.config/powershell" exists
DEBUG Path "/Users/username/.config/emacs" doesn't exist
DEBUG Path "/Users/username/.emacs.d" doesn't exist
DEBUG Cannot find "doas"
DEBUG Cannot find "please"
DEBUG Detected "/usr/bin/sudo" as "sudo"
DEBUG Step "vim"
DEBUG Detected "/usr/bin/vim" as "vim"
DEBUG Executing command `/usr/bin/vim --version`
DEBUG Path "/Users/username/.vimrc" exists

── 11:32:17 - Vim ──────────────────────────────────────────────────────────────
DEBUG Wrote vim script to "/var/folders/_p/ds5yk4sn1zl79qhr4hz2ybfr0000gp/T/.tmpv638Z9"
DEBUG Executing command `/usr/bin/vim -u /Users/username/.vimrc -U NONE -V1 -nNesS /var/folders/_p/ds5yk4sn1zl79qhr4hz2ybfr0000gp/T/.tmpv638Z9`
DEBUG Command failed: Err(
   0: Command failed: `/usr/bin/vim -u /Users/username/.vimrc -U NONE -V1 -nNesS /var/folders/_p/ds5yk4sn1zl79qhr4hz2ybfr0000gp/T/.tmpv638Z9`

      Stderr:
      not found in 'runtimepath': "ftdetect/*.vim"
      not found in 'packpath': "pack/*/start/matchit"
      not found in 'packpath': "pack/*/start/*"
      not found in 'packpath': "pack/*/start/*"
      not found in 'runtimepath': "plugin/**/*.vim"
      Reading viminfo file "/Users/username/.viminfo" info oldfiles
      W22: Text found after :endfunction: !
      Plug
      Downloading the latest version of vim-plugvim-plug is already up-to-date
      Error detected while processing command line..script /private/var/folders/_p/ds5yk4sn1zl79qhr4hz2ybfr0000gp/T/.tmpv638Z9[28]..function 8_update[1]..8_update_impl[53]..8_prepare[18]..8_new_window[1]..BufNew Autocommands for "*"..function 26_UseConfigFiles:
      line    6:
      E495: No autocommand file name to substitute for ""
      not found in 'runtimepath': "ftplugin/vim-plug.vim ftplugin/vim-plug_*.vim ftplugin/vim-plug/*.vim"
      not found in 'runtimepath': "indent/vim-plug.vim"Writing viminfo file "/Users/username/.viminfo"
   1: `/usr/bin/vim` failed: exit status: 1

Location:
   src/executor.rs:168

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: backtrace::capture::Backtrace::new::he8de1d7d1ffa87f2
      at :
   2: color_eyre::config::EyreHook::into_eyre_hook::{{closure}}::hb65840127923e0a6
      at :
   3: ::ext_report::h18e7f0a3a3529d32
      at :
   4: topgrade::command::CommandExt::output_checked::h5e89ae6dfd5d2d69
      at :
   5: topgrade::steps::vim::upgrade::h401a76f9f09c9d77
      at :
   6: topgrade::runner::Runner::execute::hf56274901aa3b82b
      at :
   7: topgrade::run::he0bbbe06d07c6c1a
      at :
   8: topgrade::main::hf52e379c756dc2bf
      at :
   9: std::sys_common::backtrace::__rust_begin_short_backtrace::he6eb0de1502f8480
      at :
  10: _main
      at :

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.)
DEBUG Step "vim" failed:
   0: Command failed: `/usr/bin/vim -u /Users/username/.vimrc -U NONE -V1 -nNesS /var/folders/_p/ds5yk4sn1zl79qhr4hz2ybfr0000gp/T/.tmpv638Z9`

      Stderr:
      not found in 'runtimepath': "ftdetect/*.vim"
      not found in 'packpath': "pack/*/start/matchit"
      not found in 'packpath': "pack/*/start/*"
      not found in 'packpath': "pack/*/start/*"
      not found in 'runtimepath': "plugin/**/*.vim"
      Reading viminfo file "/Users/username/.viminfo" info oldfiles
      W22: Text found after :endfunction: !
      Plug
      Downloading the latest version of vim-plugvim-plug is already up-to-date
      Error detected while processing command line..script /private/var/folders/_p/ds5yk4sn1zl79qhr4hz2ybfr0000gp/T/.tmpv638Z9[28]..function 8_update[1]..8_update_impl[53]..8_prepare[18]..8_new_window[1]..BufNew Autocommands for "*"..function 26_UseConfigFiles:
      line    6:
      E495: No autocommand file name to substitute for ""
      not found in 'runtimepath': "ftplugin/vim-plug.vim ftplugin/vim-plug_*.vim ftplugin/vim-plug/*.vim"
      not found in 'runtimepath': "indent/vim-plug.vim"Writing viminfo file "/Users/username/.viminfo"
   1: `/usr/bin/vim` failed: exit status: 1

Location:
   src/executor.rs:168

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: backtrace::capture::Backtrace::new::he8de1d7d1ffa87f2
      at :
   2: color_eyre::config::EyreHook::into_eyre_hook::{{closure}}::hb65840127923e0a6
      at :
   3: ::ext_report::h18e7f0a3a3529d32
      at :
   4: topgrade::command::CommandExt::output_checked::h5e89ae6dfd5d2d69
      at :
   5: topgrade::steps::vim::upgrade::h401a76f9f09c9d77
      at :
   6: topgrade::runner::Runner::execute::hf56274901aa3b82b
      at :
   7: topgrade::run::he0bbbe06d07c6c1a
      at :
   8: topgrade::main::hf52e379c756dc2bf
      at :
   9: std::sys_common::backtrace::__rust_begin_short_backtrace::he6eb0de1502f8480
      at :
  10: _main
      at :

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
vim failed:
   0: Command failed: `/usr/bin/vim -u /Users/username/.vimrc -U NONE -V1 -nNesS /var/folders/_p/ds5yk4sn1zl79qhr4hz2ybfr0000gp/T/.tmpv638Z9`

      Stderr:
      not found in 'runtimepath': "ftdetect/*.vim"
      not found in 'packpath': "pack/*/start/matchit"
      not found in 'packpath': "pack/*/start/*"
      not found in 'packpath': "pack/*/start/*"
      not found in 'runtimepath': "plugin/**/*.vim"
      Reading viminfo file "/Users/username/.viminfo" info oldfiles
      W22: Text found after :endfunction: !
      Plug
      Downloading the latest version of vim-plugvim-plug is already up-to-date
      Error detected while processing command line..script /private/var/folders/_p/ds5yk4sn1zl79qhr4hz2ybfr0000gp/T/.tmpv638Z9[28]..function 8_update[1]..8_update_impl[53]..8_prepare[18]..8_new_window[1]..BufNew Autocommands for "*"..function 26_UseConfigFiles:
      line    6:
      E495: No autocommand file name to substitute for ""
      not found in 'runtimepath': "ftplugin/vim-plug.vim ftplugin/vim-plug_*.vim ftplugin/vim-plug/*.vim"
      not found in 'runtimepath': "indent/vim-plug.vim"Writing viminfo file "/Users/username/.viminfo"
   1: `/usr/bin/vim` failed: exit status: 1

Location:
   src/executor.rs:168

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: backtrace::capture::Backtrace::new::he8de1d7d1ffa87f2
      at :
   2: color_eyre::config::EyreHook::into_eyre_hook::{{closure}}::hb65840127923e0a6
      at :
   3: ::ext_report::h18e7f0a3a3529d32
      at :
   4: topgrade::command::CommandExt::output_checked::h5e89ae6dfd5d2d69
      at :
   5: topgrade::steps::vim::upgrade::h401a76f9f09c9d77
      at :
   6: topgrade::runner::Runner::execute::hf56274901aa3b82b
      at :
   7: topgrade::run::he0bbbe06d07c6c1a
      at :
   8: topgrade::main::hf52e379c756dc2bf
      at :
   9: std::sys_common::backtrace::__rust_begin_short_backtrace::he6eb0de1502f8480
      at :
  10: _main
      at :

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Retry? (y)es/(N)o/(s)hell/(q)uit
DEBUG Step "Neovim"
DEBUG Step "The Ultimate vimrc"
DEBUG Step "voom"
DEBUG Checking if /Users/username/.vim is a git repository
DEBUG Executing command `/Users/username/bin/shims/git rev-parse --show-toplevel`
DEBUG Command failed: Err(
   0: Command failed: `/Users/username/bin/shims/git rev-parse --show-toplevel`

      Stderr:
      fatal: not a git repository (or any of the parent directories): .git
   1: `/Users/username/bin/shims/git` failed: exit status: 128

Location:
   src/steps/git.rs:166

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: backtrace::capture::Backtrace::new::he8de1d7d1ffa87f2
      at :
   2: color_eyre::config::EyreHook::into_eyre_hook::{{closure}}::hb65840127923e0a6
      at :
   3: ::ext_report::h18e7f0a3a3529d32
      at :
   4: topgrade::command::CommandExt::output_checked::h5e89ae6dfd5d2d69
      at :
   5: topgrade::steps::git::Repositories::insert_if_repo::h662c0968896509db
      at :
   6: topgrade::run::he0bbbe06d07c6c1a
      at :
   7: topgrade::main::hf52e379c756dc2bf
      at :
   8: std::sys_common::backtrace::__rust_begin_short_backtrace::he6eb0de1502f8480
      at :
   9: _main
      at :

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.)
DEBUG /Users/username/.config/nvim does not exists
DEBUG /Users/username/.ideavimrc does not exists
DEBUG /Users/username/.intellimacs does not exists
DEBUG /Users/username/.zshrc is a file. Checking /Users/username
DEBUG Checking if /Users/username is a git repository
DEBUG Executing command `/Users/username/bin/shims/git rev-parse --show-toplevel`
DEBUG Command failed: Err(
   0: Command failed: `/Users/username/bin/shims/git rev-parse --show-toplevel`

      Stderr:
      fatal: not a git repository (or any of the parent directories): .git
   1: `/Users/username/bin/shims/git` failed: exit status: 128

Location:
   src/steps/git.rs:166

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: backtrace::capture::Backtrace::new::he8de1d7d1ffa87f2
      at :
   2: color_eyre::config::EyreHook::into_eyre_hook::{{closure}}::hb65840127923e0a6
      at :
   3: ::ext_report::h18e7f0a3a3529d32
      at :
   4: topgrade::command::CommandExt::output_checked::h5e89ae6dfd5d2d69
      at :
   5: topgrade::steps::git::Repositories::insert_if_repo::h662c0968896509db
      at :
   6: topgrade::run::he0bbbe06d07c6c1a
      at :
   7: topgrade::main::hf52e379c756dc2bf
      at :
   8: std::sys_common::backtrace::__rust_begin_short_backtrace::he6eb0de1502f8480
      at :
   9: _main
      at :

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.)
DEBUG /Users/username/.config/fish does not exists
DEBUG /Users/username/.config/openbox does not exists
DEBUG /Users/username/.config/bspwm does not exists
DEBUG /Users/username/.config/i3 does not exists
DEBUG /Users/username/.config/sway does not exists
DEBUG Checking if /Users/username/.config/powershell is a git repository
DEBUG Executing command `/Users/username/bin/shims/git rev-parse --show-toplevel`
DEBUG Command failed: Err(
   0: Command failed: `/Users/username/bin/shims/git rev-parse --show-toplevel`

      Stderr:
      fatal: not a git repository (or any of the parent directories): .git
   1: `/Users/username/bin/shims/git` failed: exit status: 128

Location:
   src/steps/git.rs:166

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: backtrace::capture::Backtrace::new::he8de1d7d1ffa87f2
      at :
   2: color_eyre::config::EyreHook::into_eyre_hook::{{closure}}::hb65840127923e0a6
      at :
   3: ::ext_report::h18e7f0a3a3529d32
      at :
   4: topgrade::command::CommandExt::output_checked::h5e89ae6dfd5d2d69
      at :
   5: topgrade::steps::git::Repositories::insert_if_repo::h5138582e085b98a4
      at :
   6: topgrade::run::he0bbbe06d07c6c1a
      at :
   7: topgrade::main::hf52e379c756dc2bf
      at :
   8: std::sys_common::backtrace::__rust_begin_short_backtrace::he6eb0de1502f8480
      at :
   9: _main
      at :

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.)

── 11:32:22 - Summary ──────────────────────────────────────────────────────────
vim: FAILED
Neovim: SKIPPED: Cannot find "nvim" in PATH
The Ultimate vimrc: SKIPPED: Path "/Users/username/.vim_runtime" doesn't exist
voom: SKIPPED: Cannot find "voom" in PATH
DEBUG Desktop notification: Topgrade finished with errors

I found out it is a problem with editorconfig-vim plugin, see my issue there: https://github.com/editorconfig/editorconfig-vim/issues/221

Maybe such errors from plugins can be ignored and the update can go on. I don't know if there is a new update for the plugin it gets installed with topgrade or not.

Thanks in advance. Reini

SteveLauC commented 1 year ago

Maybe such errors from plugins can be ignored and the update can go on.

Topgrade has a configuration entry to ignore errors from a specific step, see:

https://github.com/topgrade-rs/topgrade/blob/dc78b00c3cf94849316ded8335aa1566e5c29ce3/config.example.toml#L14-L15

With this configuration, errors will still be outputted to stderr, but Topgrade won't ask you if you want to retry the step after its failure but update the next step instead.

# You won't see this if you ignore the error

Retry? (y)es/(N)o/(s)hell/(q)uit

Since this issue is related to an external tool, I will tag this issue upstream.