From 2af242ac8304ba92c5871c4738e3381813d2f04d Mon Sep 17 00:00:00 2001 From: Chris Pryer <14341145+cnpryer@users.noreply.github.com> Date: Fri, 3 Nov 2023 11:37:21 -0400 Subject: [PATCH] Add `huak-toolchain` (789) --- Cargo.lock | 2 +- crates/huak-cli/Cargo.toml | 2 +- crates/huak-package-manager/src/error.rs | 4 ++-- crates/huak-package-manager/src/ops/toolchain.rs | 2 +- crates/huak-package-manager/src/workspace.rs | 2 +- pyproject.toml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a6afb33b..c2901b09 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -539,7 +539,7 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "huak" -version = "0.0.19" +version = "0.0.19-alpha1" dependencies = [ "clap", "clap_complete", diff --git a/crates/huak-cli/Cargo.toml b/crates/huak-cli/Cargo.toml index d0208190..fae9c567 100644 --- a/crates/huak-cli/Cargo.toml +++ b/crates/huak-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "huak" -version = "0.0.19" +version = "0.0.19-alpha1" description = "A Python package manager written in Rust and inspired by Cargo." repository = "https://github.com/cnpryer/huak.git" homepage = "https://github.com/cnpryer/huak.git" diff --git a/crates/huak-package-manager/src/error.rs b/crates/huak-package-manager/src/error.rs index af4cac34..91634f31 100644 --- a/crates/huak-package-manager/src/error.rs +++ b/crates/huak-package-manager/src/error.rs @@ -25,9 +25,9 @@ pub enum Error { #[error("a problem occurred resolving huak's home directory")] HuakHomeNotFound, #[error("a toolchain cannot be found")] - HuakToolchainNotFound, + ToolchainNotFound, #[error("{0}")] // See TODO note above. - HuakToolchainError(#[from] huak_toolchain::Error), + ToolchainError(#[from] huak_toolchain::Error), #[error("a toolchain already exists: {0}")] LocalToolchainExists(PathBuf), #[error("a problem with huak's internals occurred: {0}")] diff --git a/crates/huak-package-manager/src/ops/toolchain.rs b/crates/huak-package-manager/src/ops/toolchain.rs index 03268339..1fd48751 100644 --- a/crates/huak-package-manager/src/ops/toolchain.rs +++ b/crates/huak-package-manager/src/ops/toolchain.rs @@ -282,7 +282,7 @@ fn install(path: PathBuf, channel: Channel, config: &Config) -> HuakResult<()> { .is_err() { if let Err(e) = toolchain.register_tool_from_path(&path, "python", true) { - return Err(Error::HuakToolchainError(e)); + return Err(Error::ToolchainError(e)); } } diff --git a/crates/huak-package-manager/src/workspace.rs b/crates/huak-package-manager/src/workspace.rs index 3e70906a..a99c94f6 100644 --- a/crates/huak-package-manager/src/workspace.rs +++ b/crates/huak-package-manager/src/workspace.rs @@ -128,7 +128,7 @@ impl Workspace { /// 3. ~/.huak/settings.toml configuration pub fn resolve_local_toolchain(&self, channel: Option<&Channel>) -> HuakResult { let Some(it) = resolve_local_toolchain(self, channel) else { - return Err(Error::HuakToolchainNotFound); + return Err(Error::ToolchainNotFound); }; Ok(it) diff --git a/pyproject.toml b/pyproject.toml index 42042103..2fa33466 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "huak" -version = "0.0.19" +version = "0.0.19a1" description = "A Python package manager written in Rust and inspired by Cargo." authors = [ {email = "cnpryer@gmail.com"},