Skip to content

Commit

Permalink
Rename 'production' to 'performance' and make it on-by-default
Browse files Browse the repository at this point in the history
As per comments on astral-sh#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.
  • Loading branch information
fasterthanlime committed Sep 23, 2024
1 parent 09357dc commit 90072a7
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 28 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
8 changes: 4 additions & 4 deletions crates/uv-dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ 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"
# We don't want to build the dev CLI by default, so we skip it by requiring an off-by-default feature
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"]
2 changes: 1 addition & 1 deletion crates/uv-distribution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ insta = { version = "1.40.0", features = ["filters", "json", "redactions"] }

[features]
default = []
production = ["uv-extract/production"]
performance = ["uv-extract/performance"]
2 changes: 1 addition & 1 deletion crates/uv-extract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ zip = { workspace = true }

[features]
default = []
production = ["xz2/static"]
performance = ["xz2/static"]

[package.metadata.cargo-shear]
ignored = ["xz2"]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "uv-production-flate2-backend"
name = "uv-performance-flate2-backend"
version = "0.1.0"
publish = false

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "uv-production-memory-allocator"
name = "uv-performance-memory-allocator"
version = "0.1.0"
publish = false

Expand Down
22 changes: 11 additions & 11 deletions crates/uv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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 = []
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
]
Expand Down

0 comments on commit 90072a7

Please sign in to comment.