all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer 0/5] chroot, assistant: replace clap with pico-args
Date: Fri,  9 May 2025 14:09:12 +0200	[thread overview]
Message-ID: <20250509121007.1430080-1-c.heiss@proxmox.com> (raw)

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-3a93bffc1eb6@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	other threads:[~2025-05-09 12:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-09 12:09 Christoph Heiss [this message]
2025-05-09 12:09 ` [pve-devel] [PATCH installer 1/5] common: introduce simple cli subcommand parser based on pico-args Christoph Heiss
2025-05-09 12:09 ` [pve-devel] [PATCH installer 2/5] chroot: replace clap with pico-args for command argument parsing Christoph Heiss
2025-05-09 12:09 ` [pve-devel] [PATCH installer 3/5] assistant: " Christoph Heiss
2025-05-09 12:09 ` [pve-devel] [PATCH installer 4/5] chroot: replace btrfs parsing regex with lsblk json parsing Christoph Heiss
2025-05-09 12:09 ` [pve-devel] [PATCH installer 5/5] tui: drop unused dependencies from manifest Christoph Heiss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250509121007.1430080-1-c.heiss@proxmox.com \
    --to=c.heiss@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal