From 90072a76087da5c15cb66215962af36bd66d60a3 Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Mon, 23 Sep 2024 16:26:05 +0200 Subject: [PATCH] Rename 'production' to 'performance' and make it on-by-default As per comments on https://github.com/astral-sh/uv/pull/7000, since a lot of uv work is focused on performance, it makes sense to keep those enabled by default. However, it's still nice to have everything in one place. --- Cargo.lock | 10 ++++----- Cargo.toml | 4 ++-- crates/uv-dev/Cargo.toml | 8 +++---- crates/uv-distribution/Cargo.toml | 2 +- crates/uv-extract/Cargo.toml | 2 +- .../Cargo.toml | 2 +- .../src/lib.rs | 0 .../Cargo.lock | 0 .../Cargo.toml | 2 +- .../src/lib.rs | 0 crates/uv/Cargo.toml | 22 +++++++++---------- pyproject.toml | 4 ++-- 12 files changed, 28 insertions(+), 28 deletions(-) rename crates/{uv-production-flate2-backend => uv-performance-flate2-backend}/Cargo.toml (90%) rename crates/{uv-production-flate2-backend => uv-performance-flate2-backend}/src/lib.rs (100%) rename crates/{uv-production-memory-allocator => uv-performance-memory-allocator}/Cargo.lock (100%) rename crates/{uv-production-memory-allocator => uv-performance-memory-allocator}/Cargo.toml (89%) rename crates/{uv-production-memory-allocator => uv-performance-memory-allocator}/src/lib.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 0f3797567a042..58947306ff04f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4498,8 +4498,8 @@ dependencies = [ "uv-git", "uv-installer", "uv-normalize", - "uv-production-flate2-backend", - "uv-production-memory-allocator", + "uv-performance-flate2-backend", + "uv-performance-memory-allocator", "uv-python", "uv-requirements", "uv-resolver", @@ -4740,7 +4740,7 @@ dependencies = [ "uv-installer", "uv-macros", "uv-options-metadata", - "uv-production-memory-allocator", + "uv-performance-memory-allocator", "uv-python", "uv-settings", "uv-workspace", @@ -4962,14 +4962,14 @@ dependencies = [ ] [[package]] -name = "uv-production-flate2-backend" +name = "uv-performance-flate2-backend" version = "0.1.0" dependencies = [ "flate2", ] [[package]] -name = "uv-production-memory-allocator" +name = "uv-performance-memory-allocator" version = "0.1.0" dependencies = [ "mimalloc", diff --git a/Cargo.toml b/Cargo.toml index 44066bedfdd93..192a1066a5d3e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,8 +6,8 @@ exclude = [ "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", + "crates/uv-performance-memory-allocator", + "crates/uv-performance-flate2-backend", ] resolver = "2" diff --git a/crates/uv-dev/Cargo.toml b/crates/uv-dev/Cargo.toml index e5865fbea5a73..cc3f176266cce 100644 --- a/crates/uv-dev/Cargo.toml +++ b/crates/uv-dev/Cargo.toml @@ -52,7 +52,7 @@ tracing = { workspace = true } tracing-durations-export = { workspace = true, features = ["plot"] } tracing-subscriber = { workspace = true } walkdir = { workspace = true } -uv-production-memory-allocator = { path = "../uv-production-memory-allocator", optional = true } +uv-performance-memory-allocator = { path = "../uv-performance-memory-allocator", optional = true } [[bin]] name = "uv-dev" @@ -60,11 +60,11 @@ name = "uv-dev" required-features = ["dev"] [features] -default = [] +default = ["performance"] # Actually build the dev CLI. dev = [] -production = ["dep:uv-production-memory-allocator"] +performance = ["dep:uv-performance-memory-allocator"] render = ["poloto", "resvg", "tagu"] [package.metadata.cargo-shear] -ignored = ["flate2", "uv-production-memory-allocator", "uv-production-flate2-backend"] +ignored = ["flate2", "uv-performance-memory-allocator", "uv-performance-flate2-backend"] diff --git a/crates/uv-distribution/Cargo.toml b/crates/uv-distribution/Cargo.toml index 60f6a72535441..1845a60951fdc 100644 --- a/crates/uv-distribution/Cargo.toml +++ b/crates/uv-distribution/Cargo.toml @@ -58,4 +58,4 @@ insta = { version = "1.40.0", features = ["filters", "json", "redactions"] } [features] default = [] -production = ["uv-extract/production"] +performance = ["uv-extract/performance"] diff --git a/crates/uv-extract/Cargo.toml b/crates/uv-extract/Cargo.toml index 4081d8ed5dee2..b1f006c205813 100644 --- a/crates/uv-extract/Cargo.toml +++ b/crates/uv-extract/Cargo.toml @@ -35,7 +35,7 @@ zip = { workspace = true } [features] default = [] -production = ["xz2/static"] +performance = ["xz2/static"] [package.metadata.cargo-shear] ignored = ["xz2"] diff --git a/crates/uv-production-flate2-backend/Cargo.toml b/crates/uv-performance-flate2-backend/Cargo.toml similarity index 90% rename from crates/uv-production-flate2-backend/Cargo.toml rename to crates/uv-performance-flate2-backend/Cargo.toml index fdffef50e30c1..5dba55cc8f9ae 100644 --- a/crates/uv-production-flate2-backend/Cargo.toml +++ b/crates/uv-performance-flate2-backend/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "uv-production-flate2-backend" +name = "uv-performance-flate2-backend" version = "0.1.0" publish = false diff --git a/crates/uv-production-flate2-backend/src/lib.rs b/crates/uv-performance-flate2-backend/src/lib.rs similarity index 100% rename from crates/uv-production-flate2-backend/src/lib.rs rename to crates/uv-performance-flate2-backend/src/lib.rs diff --git a/crates/uv-production-memory-allocator/Cargo.lock b/crates/uv-performance-memory-allocator/Cargo.lock similarity index 100% rename from crates/uv-production-memory-allocator/Cargo.lock rename to crates/uv-performance-memory-allocator/Cargo.lock diff --git a/crates/uv-production-memory-allocator/Cargo.toml b/crates/uv-performance-memory-allocator/Cargo.toml similarity index 89% rename from crates/uv-production-memory-allocator/Cargo.toml rename to crates/uv-performance-memory-allocator/Cargo.toml index e654e4eedd9e1..534461f30c3bb 100644 --- a/crates/uv-production-memory-allocator/Cargo.toml +++ b/crates/uv-performance-memory-allocator/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "uv-production-memory-allocator" +name = "uv-performance-memory-allocator" version = "0.1.0" publish = false diff --git a/crates/uv-production-memory-allocator/src/lib.rs b/crates/uv-performance-memory-allocator/src/lib.rs similarity index 100% rename from crates/uv-production-memory-allocator/src/lib.rs rename to crates/uv-performance-memory-allocator/src/lib.rs diff --git a/crates/uv/Cargo.toml b/crates/uv/Cargo.toml index 53d8a4dec32c4..be94bca7c9e95 100644 --- a/crates/uv/Cargo.toml +++ b/crates/uv/Cargo.toml @@ -46,8 +46,8 @@ uv-types = { workspace = true } uv-virtualenv = { workspace = true } uv-warnings = { workspace = true } uv-workspace = { workspace = true } -uv-production-memory-allocator = { path = "../uv-production-memory-allocator", optional = true } -uv-production-flate2-backend = { path = "../uv-production-flate2-backend", optional = true } +uv-performance-memory-allocator = { path = "../uv-performance-memory-allocator", optional = true } +uv-performance-flate2-backend = { path = "../uv-performance-flate2-backend", optional = true } anstream = { workspace = true } anyhow = { workspace = true } @@ -112,20 +112,20 @@ zip = { workspace = true } [package.metadata.cargo-shear] ignored = [ "flate2", - "uv-production-memory-allocator", - "uv-production-flate2-backend", + "uv-performance-memory-allocator", + "uv-performance-flate2-backend", ] [features] -default = ["python", "pypi", "git"] +default = ["python", "pypi", "git", "performance"] # Use better memory allocators, etc. — also turns-on self-update. -production = [ - "production-memory-allocator", - "production-flate2-backend", - "uv-distribution/production", +performance = [ + "performance-memory-allocator", + "performance-flate2-backend", + "uv-distribution/performance", ] -production-memory-allocator = ["dep:uv-production-memory-allocator"] -production-flate2-backend = ["dep:uv-production-flate2-backend"] +performance-memory-allocator = ["dep:uv-performance-memory-allocator"] +performance-flate2-backend = ["dep:uv-performance-flate2-backend"] # Introduces a dependency on a local Python installation. python = [] diff --git a/pyproject.toml b/pyproject.toml index 9c7034d817eea..90185c02ac8e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,8 +46,8 @@ strip = true include = [ { path = "rust-toolchain.toml", format = ["sdist", "wheel"] }, # this one isn't discovered by maturin because it's behind a feature flag - { path = "crates/uv-production-memory-allocator/**/*", format = ["sdist", "wheel"] }, - { path = "crates/uv-production-flate2-backend/**/*", format = ["sdist", "wheel"] }, + { path = "crates/uv-performance-memory-allocator/**/*", format = ["sdist", "wheel"] }, + { path = "crates/uv-performance-flate2-backend/**/*", format = ["sdist", "wheel"] }, { path = "LICENSE-APACHE", format = "sdist" }, { path = "LICENSE-MIT", format = "sdist" }, ]