This series first and foremost replaces clap, which is used by
proxmox-chroot and proxmox-auto-install-assistant for parsing CLI
arguments.

clap likes to completely overhaul its API with ~each major release,
which causes quite some churn. It is also quite heavyweight, both in
compile time and binary size impact (see patches #2 & #3 for details on
that). 

We already use pico-args in other tools such as pmg-log-tracker and
vma-to-pbs. Thomas also favored removing clap in the past, most recently
in [0].

Patches #4 through #5 are two other small cleanups & optimizations, esp.
#4 dropping another big dependency (regex) at least for one tool.

[0] 
https://lore.proxmox.com/pve-devel/f5a03ff5-7190-4d19-8fa9-3a93bffc1...@proxmox.com/

Christoph Heiss (5):
  common: introduce simple cli subcommand parser based on pico-args
  chroot: replace clap with pico-args for command argument parsing
  assistant: replace clap with pico-args for command argument parsing
  chroot: replace btrfs parsing regex with lsblk json parsing
  tui: drop unused dependencies from manifest

 Cargo.toml                                 |   1 +
 debian/control                             |   2 +-
 proxmox-auto-install-assistant/Cargo.toml  |   6 +-
 proxmox-auto-install-assistant/src/main.rs | 536 +++++++++++++++------
 proxmox-auto-installer/Cargo.toml          |   1 -
 proxmox-auto-installer/src/answer.rs       |   6 +-
 proxmox-auto-installer/src/utils.rs        |   7 +-
 proxmox-chroot/Cargo.toml                  |   6 +-
 proxmox-chroot/src/main.rs                 | 207 +++++---
 proxmox-installer-common/Cargo.toml        |   4 +
 proxmox-installer-common/src/cli.rs        |  62 +++
 proxmox-installer-common/src/lib.rs        |   3 +
 proxmox-tui-installer/Cargo.toml           |   2 -
 13 files changed, 612 insertions(+), 231 deletions(-)
 create mode 100644 proxmox-installer-common/src/cli.rs

-- 
2.49.0



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to