Commit 5da2fb5f authored by Wohlgemuth, Jason's avatar Wohlgemuth, Jason
Browse files

feat: Upgrade bon

parent d8638c31
Loading
Loading
Loading
Loading
Loading
+4 −26
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ checksum = "1063e51081069f35c51520d9facc4c378b1c2cb303e122f04a19951345bda8a9"
dependencies = [
 "aho-corasick",
 "bat",
 "bon 3.8.1",
 "bon",
 "chrono",
 "clap",
 "color-eyre",
@@ -763,39 +763,16 @@ dependencies = [
 "piper",
]

[[package]]
name = "bon"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97493a391b4b18ee918675fb8663e53646fd09321c58b46afa04e8ce2499c869"
dependencies = [
 "bon-macros 2.3.0",
 "rustversion",
]

[[package]]
name = "bon"
version = "3.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebeb9aaf9329dff6ceb65c689ca3db33dbf15f324909c60e4e5eef5701ce31b1"
dependencies = [
 "bon-macros 3.8.1",
 "bon-macros",
 "rustversion",
]

[[package]]
name = "bon-macros"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a2af3eac944c12cdf4423eab70d310da0a8e5851a18ffb192c0a5e3f7ae1663"
dependencies = [
 "darling 0.20.10",
 "ident_case",
 "proc-macro2",
 "quote",
 "syn 2.0.99",
]

[[package]]
name = "bon-macros"
version = "3.8.1"
@@ -9296,7 +9273,8 @@ name = "xylem-lib"
version = "0.0.11"
dependencies = [
 "acorn-lib",
 "bon 2.3.0",
 "assert_cmd",
 "bon",
 "bytes",
 "clap",
 "clap-verbosity-flag",
+2 −0
Original line number Diff line number Diff line
@@ -30,6 +30,8 @@ tracing = { workspace = true }
tracing-log = { workspace = true }
tracing-subscriber = { workspace = true }
uriparse = { workspace = true }

[dev-dependencies]
assert_cmd = "2.0.16"

[lints.rust]
+4 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ description.workspace = true
edition = "2021"

[dependencies]
bon = "2.0.1"
bon = "3.8.1"
bytes = "1.7.2"
clap = { version = "4.4.2" }
derive_more = { version = "1.0.0", features = ["display", "from_str"] }
@@ -38,5 +38,8 @@ tracing-log = { workspace = true }
tracing-subscriber = { workspace = true }
uriparse = { workspace = true }

[dev-dependencies]
assert_cmd = "2.0.16"

[lints.rust]
unsafe_code = "forbid"
+1 −8
Original line number Diff line number Diff line
use acorn_lib::util::{download_binary, extension, make_executable, read_file, snake_case, to_absolute_string, Label, ToAbsoluteString};
use acorn_lib::{Location, Scheme};
use bon::Builder;
use bon::{builder, Builder};
use owo_colors::OwoColorize;
use rayon::prelude::*;
use serde::{Deserialize, Serialize};
@@ -77,17 +77,12 @@ pub struct Config {
#[derive(Builder, Clone, Debug, Deserialize, Serialize)]
#[builder(start_fn(name = init))]
pub struct ConfigOptions {
    #[builder]
    pub root: Option<PathBuf>,
    #[builder]
    #[serde(alias = "dry-run")]
    pub dry_run: Option<bool>,
    #[builder]
    pub offline: Option<bool>,
    #[builder]
    #[serde(alias = "skip-checksum", alias = "skip-verify-checksum")]
    pub skip_verify_checksum: Option<bool>,
    #[builder]
    #[serde(alias = "skip-requirements", alias = "skip-verify-requirements")]
    pub skip_verify_requirements: Option<bool>,
}
@@ -110,10 +105,8 @@ pub struct Rule {
    /// Name of the rule (displayed by the progress bar)
    #[builder(default)]
    pub name: String,
    #[builder]
    pub uri: Option<String>,
    /// Options to pass to the checker
    #[builder]
    pub parameters: Option<Parameters>,
}
impl Config {
+1 −7
Original line number Diff line number Diff line
use acorn_lib::util::{read_file, to_absolute_string, Label, ToAbsoluteString};
use acorn_lib::{Location, Scheme};
use bon::Builder;
use bon::{builder, Builder};
use derive_more::{Display, FromStr};
use fancy_regex::Regex;
use owo_colors::OwoColorize;
@@ -189,10 +189,8 @@ pub struct Command {
    #[builder(default)]
    pub name: String,
    /// Virtual environment struct that contains details about the associated virtual environment
    #[builder]
    pub virtual_environment: Option<VirtualEnvironment>,
    /// Container struct that contains details about the associated containerized environment
    #[builder]
    pub container: Option<ContainerEnvironment>,
}
/// Struct for using and sharing containerized environments
@@ -214,10 +212,8 @@ pub struct ContainerEnvironment {
    #[builder(default=ContainerRuntime::Docker)]
    pub runtime: ContainerRuntime,
    /// Context name to use (defaults to active context)
    #[builder]
    pub context: Option<String>,
    /// Name of image container was built from
    #[builder]
    pub image: Option<String>,
}
#[derive(Clone, Debug, Deserialize, Display, Serialize)]
@@ -257,7 +253,6 @@ pub struct Script {
    /// Directory in which the script should be executed when run method is invoked
    #[builder(default = ".".to_string())]
    pub current_dir: String,
    #[builder]
    pub envs: Option<HashMap<String, String>>,
}
#[derive(Clone, Debug, Deserialize, Serialize)]
@@ -278,7 +273,6 @@ pub struct StringTemplate {
#[builder(start_fn(name = init))]
pub struct VirtualEnvironment {
    pub name: String,
    #[builder]
    pub path: Option<String>,
    #[builder(default=VirtualEnvironmentManager::Conda)]
    pub manager: VirtualEnvironmentManager,