From c6436c11aced75ec943d44fcc7ae0e9da8bb3db4 Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Wed, 4 Sep 2024 12:56:10 +0200 Subject: [PATCH] exclude crates from workspace checks/clippy runs --- Cargo.lock | 3 +-- Cargo.toml | 8 +++++--- crates/uv-dev/Cargo.toml | 11 +++++------ crates/uv-production-flate2-backend/Cargo.toml | 11 +---------- crates/uv-production-memory-allocator/Cargo.toml | 11 +---------- crates/uv/Cargo.toml | 4 ++-- 6 files changed, 15 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0d1dbbb871169..f83beea679caa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4707,7 +4707,6 @@ dependencies = [ "install-wheel-rs", "itertools 0.13.0", "markdown", - "mimalloc", "owo-colors", "pep508_rs", "poloto", @@ -4720,7 +4719,6 @@ dependencies = [ "serde_json", "tagu", "textwrap", - "tikv-jemallocator", "tokio", "tracing", "tracing-durations-export", @@ -4735,6 +4733,7 @@ dependencies = [ "uv-installer", "uv-macros", "uv-options-metadata", + "uv-production-memory-allocator", "uv-python", "uv-resolver", "uv-settings", diff --git a/Cargo.toml b/Cargo.toml index bc01dd938e5c3..0ec729f6e6f28 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,10 @@ exclude = [ "scripts", # Needs nightly "crates/uv-trampoline", + # Only used to pull in features, allocators, etc. — we specifically don't want them + # to be part of a workspace-wide cargo check, cargo clippy, etc. + "crates/uv-production-memory-allocator", + "crates/uv-production-flate2-backend", ] resolver = "2" @@ -56,8 +60,6 @@ uv-version = { path = "crates/uv-version" } uv-virtualenv = { path = "crates/uv-virtualenv" } uv-warnings = { path = "crates/uv-warnings" } uv-workspace = { path = "crates/uv-workspace" } -uv-production-memory-allocator = { path = "crates/uv-production-memory-allocator" } -uv-production-flate2-backend = { path = "crates/uv-production-flate2-backend" } anstream = { version = "0.6.13" } anyhow = { version = "1.0.80" } @@ -169,7 +171,7 @@ xz2 = { version = "0.1.7" } zip = { version = "0.6.6", default-features = false, features = ["deflate"] } [workspace.metadata.cargo-shear] -ignored = ["flate2", "xz2", "uv-production-memory-allocator", "uv-production-flate2-backend"] +ignored = ["flate2", "xz2"] [patch.crates-io] # For pyproject-toml diff --git a/crates/uv-dev/Cargo.toml b/crates/uv-dev/Cargo.toml index a7a740a6de6ae..0fc2e21712cd3 100644 --- a/crates/uv-dev/Cargo.toml +++ b/crates/uv-dev/Cargo.toml @@ -60,12 +60,7 @@ tracing = { workspace = true } tracing-durations-export = { workspace = true, features = ["plot"] } tracing-subscriber = { workspace = true } walkdir = { workspace = true } - -[target.'cfg(target_os = "windows")'.dependencies] -mimalloc = { version = "0.1.39" } - -[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64")))'.dependencies] -tikv-jemallocator = { version = "0.6.0" } +uv-production-memory-allocator = { path = "../uv-production-memory-allocator", optional = true } [[bin]] name = "uv-dev" @@ -76,4 +71,8 @@ required-features = ["dev"] default = [] # Actually build the dev CLI. dev = [] +production = ["dep:uv-production-memory-allocator"] render = ["poloto", "resvg", "tagu"] + +[package.metadata.cargo-shear] +ignored = ["flate2", "uv-production-flate2-backend"] diff --git a/crates/uv-production-flate2-backend/Cargo.toml b/crates/uv-production-flate2-backend/Cargo.toml index a094763c6183b..57584c2e709c7 100644 --- a/crates/uv-production-flate2-backend/Cargo.toml +++ b/crates/uv-production-flate2-backend/Cargo.toml @@ -1,19 +1,10 @@ [package] name = "uv-production-flate2-backend" version = "0.1.0" -edition.workspace = true -rust-version.workspace = true -homepage.workspace = true -documentation.workspace = true -repository.workspace = true -authors.workspace = true -license.workspace = true +publish = false [target.'cfg(not(target_arch = "s390x"))'.dependencies] flate2 = { version = "1.0.28", default-features = false, features = ["zlib-ng"] } [target.'cfg(target_arch = "s390x")'.dependencies] flate2 = { version = "1.0.28", default-features = false, features = ["rust_backend"] } - -[lints] -workspace = true diff --git a/crates/uv-production-memory-allocator/Cargo.toml b/crates/uv-production-memory-allocator/Cargo.toml index 6371911661be1..631f274eb2e5a 100644 --- a/crates/uv-production-memory-allocator/Cargo.toml +++ b/crates/uv-production-memory-allocator/Cargo.toml @@ -1,16 +1,7 @@ [package] name = "uv-production-memory-allocator" version = "0.1.0" -edition.workspace = true -rust-version.workspace = true -homepage.workspace = true -documentation.workspace = true -repository.workspace = true -authors.workspace = true -license.workspace = true - -[lints] -workspace = true +publish = false [dependencies] diff --git a/crates/uv/Cargo.toml b/crates/uv/Cargo.toml index 83dcc34d07f64..975aa5d864320 100644 --- a/crates/uv/Cargo.toml +++ b/crates/uv/Cargo.toml @@ -43,8 +43,8 @@ uv-types = { workspace = true } uv-virtualenv = { workspace = true } uv-warnings = { workspace = true } uv-workspace = { workspace = true } -uv-production-memory-allocator = { workspace = true, optional = true } -uv-production-flate2-backend = { workspace = true, optional = true } +uv-production-memory-allocator = { path = "../uv-production-memory-allocator", optional = true } +uv-production-flate2-backend = { path = "../uv-production-flate2-backend", optional = true } anstream = { workspace = true } anyhow = { workspace = true }