From c1be0faf979f10045b1f4435e461043509995324 Mon Sep 17 00:00:00 2001 From: ilevyor <81260226+ilevyor@users.noreply.github.com> Date: Sun, 17 Mar 2024 23:07:19 -0400 Subject: [PATCH] chore: remove unused cli deps (#29) --- Cargo.lock | 17 ----------------- crates/cli/Cargo.toml | 14 +++----------- crates/cli/src/lib.rs | 5 +++++ crates/cli_bin/src/main.rs | 1 + 4 files changed, 9 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c2a2d48b2..15abb13e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -781,12 +781,6 @@ dependencies = [ "parking_lot_core", ] -[[package]] -name = "debug_print" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f215f9b7224f49fb73256115331f677d868b34d18b65dbe4db392e6021eea90" - [[package]] name = "debugid" version = "0.8.0" @@ -1910,7 +1904,6 @@ version = "0.1.1" dependencies = [ "ai_builtins", "anyhow", - "assert_cmd", "buildkite-test-collector", "chrono", "clap", @@ -1919,18 +1912,15 @@ dependencies = [ "colored", "console", "dashmap", - "debug_print", "dialoguer", "env_logger", "flate2", - "fs_extra", "futures", "git2", "grit_cache", "ignore", "indicatif", "indicatif-log-bridge", - "insta", "lazy_static", "log", "marzano-auth", @@ -1941,12 +1931,10 @@ dependencies = [ "marzano-test-utils", "marzano-util", "marzano_messenger", - "ntest", "openssl", "opentelemetry", "opentelemetry-otlp", "opentelemetry_sdk", - "predicates", "rayon", "regex", "reqwest", @@ -1957,13 +1945,8 @@ dependencies = [ "tokio", "tracing", "tracing-opentelemetry", - "tracing-subscriber", - "tree-sitter-facade-sg", - "tree-sitter-gritql", - "tree-sitter-javascript", "trim-margin", "uuid", - "walkdir", ] [[package]] diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index dcd2b6a50..9b2c97154 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -4,14 +4,15 @@ version = "0.1.1" edition = "2021" authors = ["Grit Developers "] +[lints] +rust.unused_crate_dependencies = "forbid" + [lib] path = "src/lib.rs" [dependencies] anyhow = "1.0.70" clap = { version = "4.1.13", features = ["derive"] } -tree-sitter = { path = "../../vendor/tree-sitter-facade", package = "tree-sitter-facade-sg" } -walkdir = "2.3.3" indicatif = "0.17.5" ignore = "0.4.20" # Do *NOT* upgrade beyond 1.0.171 until https://github.com/serde-rs/serde/issues/2538 is fixed @@ -29,8 +30,6 @@ env_logger = "0.10.0" git2 = "0.17.2" regex = "1.7.3" openssl = { version = "0.10", features = ["vendored"] } -tree-sitter-gritql = { path = "../../vendor/tree-sitter-gritql" } -tree-sitter-javascript = { path = "../../resources/language-metavariables/tree-sitter-javascript" } marzano-core = { path = "../core", features = [ "non_wasm", ], default-features = false } @@ -65,18 +64,11 @@ opentelemetry_sdk = { version = "0.21.1", optional = true, features = [ ] } tracing-opentelemetry = { version = "0.22.0", optional = true, default-features = false } -tracing-subscriber = { version = "0.3.18" } tracing = { version = "0.1.40", default-features = false, features = [] } [dev-dependencies] -insta = { version = "1.30.0", features = ["yaml", "redactions"] } trim-margin = "0.1.0" buildkite-test-collector = "0.1.1" -assert_cmd = "2.0.12" -predicates = "3.0.3" -fs_extra = "1.3" -ntest = "0.9.0" -debug_print = "1.0.0" similar = "2.2.1" reqwest = { version = "0.11.22", features = ["blocking", "json"] } marzano-test-utils = { path = "../test_utils" } diff --git a/crates/cli/src/lib.rs b/crates/cli/src/lib.rs index 779acae51..493a365ac 100644 --- a/crates/cli/src/lib.rs +++ b/crates/cli/src/lib.rs @@ -16,3 +16,8 @@ mod utils; mod ux; #[cfg(feature = "workflows_v2")] mod workflows; + +// git2 uses openssl, but breaks windows, so we need +// to import openssl and specify the vendored feature in order +// to prevet git2 from breaking on windows +use openssl as _; \ No newline at end of file diff --git a/crates/cli_bin/src/main.rs b/crates/cli_bin/src/main.rs index 075845335..65ec1572a 100644 --- a/crates/cli_bin/src/main.rs +++ b/crates/cli_bin/src/main.rs @@ -1,3 +1,4 @@ +#![cfg_attr(not(test), deny(unused_crate_dependencies))] use marzano_cli::commands::run_command; use marzano_cli::error::GoodError; // We always instrument