uninstall: --dry-run footer, --force tip and help text point users the wrong way

Đang mở Phù hợp với người mới
#788 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu với apps/rocm/src/uninstall_plan.rs và lần theo cách CLI hiển thị bản xem trước gỡ cài đặt cùng chân trang, bao gồm cả trường hợp kế hoạch trống. Tiếp theo, kiểm tra các định nghĩa đối số clap của lệnh gỡ cài đặt để tìm gợi ý và văn bản trợ giúp cho --force. Thêm ví dụ minh họa chạy thử rồi chạy thực tế; hoàn tất khi chân trang CLI chính xác và được lược bỏ với kế hoạch trống, --force không còn gợi ý --force-dev-binaries, và phần trợ giúp có các ví dụ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug documentation

Current behavior

Three small problems in what rocm uninstall prints and accepts:

  1. The --dry-run footer reads Choose Review uninstall to approve removal. The CLI has no such control: after --dry-run the next step is rerunning without it. The text is emitted by render_uninstall_plan (apps/rocm/src/uninstall_plan.rs) whenever dry_run is set; it is shared with the chat tool's uninstall preview (render_uninstall_dry_run), where an approval choice may exist. It also appears on an empty plan:

    $ rocm uninstall --keep-binaries --keep-config --keep-data --keep-cache --dry-run
    Uninstall review
    
    Nothing managed by rocm-cli would be removed.
    ...
    Choose Review uninstall to approve removal.
    
  2. A mistyped --force gets the clap suggestion tip: a similar argument exists: '--force-dev-binaries'. That flag ("Allow removing development binaries inside the current build tree") is a more destructive option than most users who type --force would mean to opt into.

  3. rocm uninstall --help has no examples (for instance a --dry-run first, then the real run).

Expected behavior

A footer that is correct for the CLI (and absent on an empty plan), no auto-suggestion of --force-dev-binaries, and a short examples section in the help.

Your environment

  • rocm-cli version: rocm-cli 0.1.0, built from the #782 branch (910b1d8). That branch only refactors the [y/N] prompt helper (#769) without changing its logic; not re-run on main.
  • Platform: WSL2 (Linux 6.18)
Ngôn ngữ chính
Rust
Star
49
Fork
14
Merge trung bình
3 ngày 6 giờ
Pull request đã merge (30 ngày)
183

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ROCm/rocm-cli

Tất cả issue của ROCm/rocm-cli

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.