Rename sub-command 'deps' → 'packages'

Slightly more readable and self-explanatory.
This commit is contained in:
KtorZ 2023-01-14 23:09:29 +01:00
parent 38df9a586e
commit 6286132a3e
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
6 changed files with 10 additions and 10 deletions

View File

@ -264,10 +264,10 @@ impl Diagnostic for Error {
Error::ValidatorMustReturnBool { .. } => Some(Box::new("aiken::scripts")),
Error::WrongValidatorArity { .. } => Some(Box::new("aiken::validators")),
Error::TestFailure { path, .. } => Some(Box::new(path.to_str().unwrap_or(""))),
Error::Http(_) => Some(Box::new("aiken::deps")),
Error::Http(_) => Some(Box::new("aiken::packages::download")),
Error::ZipExtract(_) => None,
Error::JoinError(_) => None,
Error::UnknownPackageVersion { .. } => Some(Box::new("aiken::deps")),
Error::UnknownPackageVersion { .. } => Some(Box::new("aiken::packages::resolve")),
}
}
@ -448,7 +448,7 @@ impl Diagnostic for Warning {
Warning::Type { .. } => Some(Box::new("aiken::check")),
Warning::NoValidators => Some(Box::new("aiken::check")),
Warning::DependencyAlreadyExists { .. } => {
Some(Box::new("aiken::deps::already_exists"))
Some(Box::new("aiken::packages::already_exists"))
}
}
}

View File

@ -1,9 +1,9 @@
pub mod build;
pub mod check;
pub mod deps;
pub mod docs;
pub mod fmt;
pub mod lsp;
pub mod new;
pub mod packages;
pub mod tx;
pub mod uplc;

View File

@ -7,7 +7,7 @@ use clap::Subcommand;
#[derive(Subcommand)]
#[clap(setting(clap::AppSettings::DeriveDisplayOrder))]
pub enum Cmd {
/// Add a new dependency
/// Add a new package dependency
Add(add::Args),
/// Clear the system-wide dependencies cache

View File

@ -1,7 +1,7 @@
use aiken::cmd::{
build, check,
deps::{self, add},
docs, fmt, lsp, new, tx, uplc,
build, check, docs, fmt, lsp, new,
packages::{self, add},
tx, uplc,
};
use clap::Parser;
@ -19,7 +19,7 @@ pub enum Cmd {
Add(add::Args),
#[clap(subcommand)]
Deps(deps::Cmd),
Packages(packages::Cmd),
#[clap(subcommand)]
Tx(tx::Cmd),
@ -46,7 +46,7 @@ fn main() -> miette::Result<()> {
Cmd::Check(args) => check::exec(args),
Cmd::Docs(args) => docs::exec(args),
Cmd::Add(args) => add::exec(args),
Cmd::Deps(args) => deps::exec(args),
Cmd::Packages(args) => packages::exec(args),
Cmd::Lsp(args) => lsp::exec(args),
Cmd::Tx(sub_cmd) => tx::exec(sub_cmd),
Cmd::Uplc(sub_cmd) => uplc::exec(sub_cmd),