Expand description
Progress indicators and user interface utilities
This module provides a unified progress system for AGPM operations using the
MultiPhaseProgress
approach. All progress tracking goes through phases to ensure
consistent user experience across different operations.
§Features
- Unified progress: All operations use
MultiPhaseProgress
for consistency - Phase-based tracking: Installation/update operations broken into logical phases
- CI/quiet mode support: Automatically disables in non-interactive environments
- Thread safety: Safe to use across async tasks and parallel operations
§Configuration
Progress indicators are now controlled via the MultiPhaseProgress
constructor
parameter rather than environment variables for better thread safety.
§Examples
§Multi-Phase Progress
use agpm_cli::utils::progress::{MultiPhaseProgress, InstallationPhase};
let progress = MultiPhaseProgress::new(true);
// Start syncing phase
progress.start_phase(InstallationPhase::SyncingSources, Some("Fetching repositories"));
// ... do work ...
progress.complete_phase(Some("Synced 3 repositories"));
// Start resolving phase
progress.start_phase(InstallationPhase::ResolvingDependencies, None);
// ... do work ...
progress.complete_phase(Some("Resolved 25 dependencies"));
Structs§
- Multi
Phase Progress - Multi-phase progress manager that displays multiple progress bars with completed phases showing as static messages
- Progress
Bar - A progress bar or spinner
Enums§
- Installation
Phase - Represents different phases of the installation process
Functions§
- collect_
dependency_ names - Helper function to collect dependency names from a manifest