From b7eee4e80b588b6cf871666871f5ee0a135da86c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Ma=C4=87kowski?= Date: Mon, 30 Mar 2026 11:03:50 +0200 Subject: [PATCH] chore(deps): use `grass_compiler` directly For our purposes, `grass` essentially re-exports `grass_compiler`. We can therefore skip one extra dependency and use `grass_compiler` instead. --- Cargo.lock | 12 +----------- Cargo.toml | 2 +- cot/Cargo.toml | 6 +++--- cot/build.rs | 6 +++--- 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 463e9384..f6535bb0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -910,7 +910,7 @@ dependencies = [ "form_urlencoded", "futures-core", "futures-util", - "grass", + "grass_compiler", "hex", "http 1.4.0", "http-body-util", @@ -1875,16 +1875,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "grass" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7a68216437ef68f0738e48d6c7bb9e6e6a92237e001b03d838314b068f33c94" -dependencies = [ - "getrandom 0.2.17", - "grass_compiler", -] - [[package]] name = "grass_compiler" version = "0.13.4" diff --git a/Cargo.toml b/Cargo.toml index de0b0138..a446e132 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -99,7 +99,7 @@ futures = { version = "0.3", default-features = false } futures-core = { version = "0.3", default-features = false } futures-util = { version = "0.3", default-features = false } glob = "0.3" -grass = { version = "0.13.4", default-features = false } +grass_compiler = { version = "0.13.4", default-features = false } heck = "0.5" hex = "0.4" http = "1.4" diff --git a/cot/Cargo.toml b/cot/Cargo.toml index 9e426dba..da7bd4b9 100644 --- a/cot/Cargo.toml +++ b/cot/Cargo.toml @@ -81,7 +81,7 @@ trybuild.workspace = true [build-dependencies] ahash.workspace = true -grass.workspace = true +grass_compiler.workspace = true [package.metadata.docs.rs] all-features = true @@ -89,8 +89,8 @@ rustdoc-args = ["--cfg", "docsrs"] [package.metadata.cargo-machete] ignored = [ - # Used indirectly by `grass`, but it doesn't work with the latest versions of Rust if minimal dependency versions - # are used + # Used indirectly by `grass_compiler`, but it doesn't work with the latest versions of Rust if minimal dependency + # versions are used "ahash", # Used by `lettre`, but it causes dependency issues if minimal dependency versions are used "chumsky", diff --git a/cot/build.rs b/cot/build.rs index a9e66eed..b15791eb 100644 --- a/cot/build.rs +++ b/cot/build.rs @@ -23,7 +23,7 @@ fn build_css() { println!("cargo::rerun-if-changed={scss_path}"); - let css = grass::from_path(scss_path, &options).expect("failed to compile SCSS"); + let css = grass_compiler::from_path(scss_path, &options).expect("failed to compile SCSS"); let out_dir = std::env::var("OUT_DIR").expect("OUT_DIR should be set"); let css_path = PathBuf::from(out_dir).join(css_file); @@ -35,6 +35,6 @@ fn build_css() { } } -fn scss_options() -> grass::Options<'static> { - grass::Options::default().style(grass::OutputStyle::Compressed) +fn scss_options() -> grass_compiler::Options<'static> { + grass_compiler::Options::default().style(grass_compiler::OutputStyle::Compressed) }