use anyhow::Result;
use clap::{Args, Subcommand};
use crate::cli::Globals;
pub mod pick_wheels;
pub mod print_deps;
#[derive(Subcommand, Debug)]
pub enum DebugOp {
PrintDeps(PrintDepsArgs),
PickWheels(PickWheelsArgs),
}
#[derive(Args, Debug)]
pub struct PrintDepsArgs {
#[arg(long)]
pub tree: Option<String>,
#[arg(long)]
pub pretty: bool,
}
#[derive(Args, Debug)]
pub struct PickWheelsArgs {
#[arg(long)]
pub tree: Option<String>,
#[arg(long)]
pub platform: Option<String>,
#[arg(long)]
pub python: Option<String>,
#[arg(long)]
pub package: Option<String>,
}
pub fn run(op: Option<DebugOp>, globals: &Globals) -> Result<()> {
match op {
None => anyhow::bail!("debug requires a subcommand (try `muntjac debug print-deps`)"),
Some(DebugOp::PrintDeps(args)) => print_deps::run(args, globals),
Some(DebugOp::PickWheels(args)) => pick_wheels::run(args, globals),
}
}