topgrade-rs / topgrade

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

What tools end up in the `--only` step? #886

Closed paddyroddy closed 2 months ago

paddyroddy commented 2 months ago

I would like to debug an issue I am having with zinit, so would like to do topgrade --only zinit, but I can see from the error that currently (Topgrade 15.0.0), the full list is

error: a value is required for '--only <STEP>...' but none was supplied
  [possible values: am, app_man, asdf, atom, audit, auto_cpufreq, bin, bob, brew_cask, brew_formula, bun, bun_packages, cargo, certbot, chezmoi, chocolatey, choosenim, clam_av_db, composer, conda, config_update, containers, custom_commands, deb_get, deno, distrobox, dkp_pacman, dotnet, elan, emacs, firmware, flatpak, flutter, fossil, gcloud, gem, ghcup, github_cli_extensions, git_repos, gnome_shell_extensions, go, guix, haxelib, helm, home_manager, jetpack, julia, juliaup, kakoune, helix, krew, lure, lensfun, macports, mamba, miktex, mas, maza, micro, mise, myrepos, nix, node, opam, pacdef, pacstall, pearl, pip3, pip_review, pip_review_local, pipupgrade, pipx, pkg, pkgin, platformio_core, pnpm, powershell, protonup, pyenv, raco, rcm, remotes, restarts, rtcl, ruby_gems, rustup, rye, scoop, sdkman, self_update, sheldon, shell, snap, sparkle, spicetify, stack, stew, system, tldr, tlmgr, tmux, toolbx, vagrant, vcpkg, vim, vscode, waydroid, winget, wsl, wsl_update, xcodes, yadm, yarn]

What are the decisions behind what ends up in the --only list? My ~/.config/topgrade.toml is

[brew]
# greedy_cask = true
autoremove = true

[misc]
# Don't ask for confirmations (no default value)
assume_yes = true
# Cleanup temporary or old files (default: false)
cleanup = true
# Disable specific steps - same options as the command line flag
disable = [
    "containers",
]
# Skip sending a notification at the end of a run (default: false)
skip_notify = true

[vim]
# For `vim-plug`, execute `PlugUpdate!` instead of `PlugUpdate`
force_plug_update = true
SteveLauC commented 2 months ago

Hi:)

--only (as well as --disable) accepts steps, and zinit is not a step, it is part of the shell step, so topgrade --only zinit won't work, topgrade --only shell will work to some extent.

Under some cases, such a rough step can cause issues, see #515.

What are the decisions behind what ends up in the --only list?

If you are asking about the reason behind this design, I actually have no idea, it was designed by the original author, repo here. If you want to know where to find the full list, it is defined by the Step type, see the source code.

paddyroddy commented 2 months ago

Thanks for the explanation @SteveLuaC! Makes sense to me, and topgrade --only shell works nicely in my case.

SteveLauC commented 2 months ago

Close as the question has been answered.