Skip to content

Commit ebc1e30

Browse files
committed
Revert build config
1 parent af4ed30 commit ebc1e30

File tree

12 files changed

+9
-148
lines changed

12 files changed

+9
-148
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/uv-dispatch/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ impl<'a> BuildContext for BuildDispatch<'a> {
214214
&BuildOptions::default(),
215215
self.hasher,
216216
self.index_locations,
217-
self.config_settings,
218217
self.cache(),
219218
venv,
220219
&markers,

crates/uv-distribution/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ license = { workspace = true }
1313
workspace = true
1414

1515
[dependencies]
16-
cache-key = { workspace = true }
1716
distribution-filename = { workspace = true }
1817
distribution-types = { workspace = true }
1918
install-wheel-rs = { workspace = true }

crates/uv-distribution/src/index/built_wheel_index.rs

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use distribution_types::{
77
use platform_tags::Tags;
88
use uv_cache::{Cache, CacheBucket, CacheShard, WheelCache};
99
use uv_cache_info::CacheInfo;
10-
use uv_configuration::ConfigSettings;
1110
use uv_fs::symlinks;
1211
use uv_types::HashStrategy;
1312

@@ -17,22 +16,15 @@ pub struct BuiltWheelIndex<'a> {
1716
cache: &'a Cache,
1817
tags: &'a Tags,
1918
hasher: &'a HashStrategy,
20-
build_configuration: &'a ConfigSettings,
2119
}
2220

2321
impl<'a> BuiltWheelIndex<'a> {
2422
/// Initialize an index of built distributions.
25-
pub fn new(
26-
cache: &'a Cache,
27-
tags: &'a Tags,
28-
hasher: &'a HashStrategy,
29-
build_configuration: &'a ConfigSettings,
30-
) -> Self {
23+
pub fn new(cache: &'a Cache, tags: &'a Tags, hasher: &'a HashStrategy) -> Self {
3124
Self {
3225
cache,
3326
tags,
3427
hasher,
35-
build_configuration,
3628
}
3729
}
3830

@@ -61,13 +53,6 @@ impl<'a> BuiltWheelIndex<'a> {
6153

6254
let cache_shard = cache_shard.shard(revision.id());
6355

64-
// If there are build settings, we need to scope to a cache shard.
65-
let cache_shard = if self.build_configuration.is_empty() {
66-
cache_shard
67-
} else {
68-
cache_shard.shard(cache_key::cache_digest(self.build_configuration))
69-
};
70-
7156
Ok(self.find(&cache_shard))
7257
}
7358
/// Return the most compatible [`CachedWheel`] for a given source distribution at a local path.
@@ -98,13 +83,6 @@ impl<'a> BuiltWheelIndex<'a> {
9883

9984
let cache_shard = cache_shard.shard(revision.id());
10085

101-
// If there are build settings, we need to scope to a cache shard.
102-
let cache_shard = if self.build_configuration.is_empty() {
103-
cache_shard
104-
} else {
105-
cache_shard.shard(cache_key::cache_digest(self.build_configuration))
106-
};
107-
10886
Ok(self
10987
.find(&cache_shard)
11088
.map(|wheel| wheel.with_cache_info(cache_info)))
@@ -147,13 +125,6 @@ impl<'a> BuiltWheelIndex<'a> {
147125

148126
let cache_shard = cache_shard.shard(revision.id());
149127

150-
// If there are build settings, we need to scope to a cache shard.
151-
let cache_shard = if self.build_configuration.is_empty() {
152-
cache_shard
153-
} else {
154-
cache_shard.shard(cache_key::cache_digest(self.build_configuration))
155-
};
156-
157128
Ok(self
158129
.find(&cache_shard)
159130
.map(|wheel| wheel.with_cache_info(cache_info)))
@@ -173,13 +144,6 @@ impl<'a> BuiltWheelIndex<'a> {
173144
WheelCache::Git(&source_dist.url, &git_sha.to_short_string()).root(),
174145
);
175146

176-
// If there are build settings, we need to scope to a cache shard.
177-
let cache_shard = if self.build_configuration.is_empty() {
178-
cache_shard
179-
} else {
180-
cache_shard.shard(cache_key::cache_digest(self.build_configuration))
181-
};
182-
183147
self.find(&cache_shard)
184148
}
185149

crates/uv-distribution/src/source/mod.rs

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -426,14 +426,6 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
426426
// freshness, since entries have to be fresher than the revision itself.
427427
let cache_shard = cache_shard.shard(revision.id());
428428

429-
// If there are build settings, we need to scope to a cache shard.
430-
let config_settings = self.build_context.config_settings();
431-
let cache_shard = if config_settings.is_empty() {
432-
cache_shard
433-
} else {
434-
cache_shard.shard(cache_key::cache_digest(config_settings))
435-
};
436-
437429
// If the cache contains a compatible wheel, return it.
438430
if let Some(built_wheel) = BuiltWheelMetadata::find_in_cache(tags, &cache_shard) {
439431
return Ok(built_wheel.with_hashes(revision.into_hashes()));
@@ -527,14 +519,6 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
527519
});
528520
}
529521

530-
// If there are build settings, we need to scope to a cache shard.
531-
let config_settings = self.build_context.config_settings();
532-
let cache_shard = if config_settings.is_empty() {
533-
cache_shard
534-
} else {
535-
cache_shard.shard(cache_key::cache_digest(config_settings))
536-
};
537-
538522
// Otherwise, we either need to build the metadata.
539523
// If the backend supports `prepare_metadata_for_build_wheel`, use it.
540524
if let Some(metadata) = self
@@ -687,14 +671,6 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
687671
// freshness, since entries have to be fresher than the revision itself.
688672
let cache_shard = cache_shard.shard(revision.id());
689673

690-
// If there are build settings, we need to scope to a cache shard.
691-
let config_settings = self.build_context.config_settings();
692-
let cache_shard = if config_settings.is_empty() {
693-
cache_shard
694-
} else {
695-
cache_shard.shard(cache_key::cache_digest(config_settings))
696-
};
697-
698674
// If the cache contains a compatible wheel, return it.
699675
if let Some(built_wheel) = BuiltWheelMetadata::find_in_cache(tags, &cache_shard) {
700676
return Ok(built_wheel);
@@ -805,14 +781,6 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
805781
});
806782
}
807783

808-
// If there are build settings, we need to scope to a cache shard.
809-
let config_settings = self.build_context.config_settings();
810-
let cache_shard = if config_settings.is_empty() {
811-
cache_shard
812-
} else {
813-
cache_shard.shard(cache_key::cache_digest(config_settings))
814-
};
815-
816784
// Otherwise, we need to build a wheel.
817785
let task = self
818786
.reporter
@@ -929,14 +897,6 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
929897
// freshness, since entries have to be fresher than the revision itself.
930898
let cache_shard = cache_shard.shard(revision.id());
931899

932-
// If there are build settings, we need to scope to a cache shard.
933-
let config_settings = self.build_context.config_settings();
934-
let cache_shard = if config_settings.is_empty() {
935-
cache_shard
936-
} else {
937-
cache_shard.shard(cache_key::cache_digest(config_settings))
938-
};
939-
940900
// If the cache contains a compatible wheel, return it.
941901
if let Some(built_wheel) = BuiltWheelMetadata::find_in_cache(tags, &cache_shard) {
942902
return Ok(built_wheel);
@@ -1060,14 +1020,6 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
10601020
));
10611021
}
10621022

1063-
// If there are build settings, we need to scope to a cache shard.
1064-
let config_settings = self.build_context.config_settings();
1065-
let cache_shard = if config_settings.is_empty() {
1066-
cache_shard
1067-
} else {
1068-
cache_shard.shard(cache_key::cache_digest(config_settings))
1069-
};
1070-
10711023
// Otherwise, we need to build a wheel.
10721024
let task = self
10731025
.reporter
@@ -1179,14 +1131,6 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
11791131

11801132
let _lock = lock_shard(&cache_shard).await?;
11811133

1182-
// If there are build settings, we need to scope to a cache shard.
1183-
let config_settings = self.build_context.config_settings();
1184-
let cache_shard = if config_settings.is_empty() {
1185-
cache_shard
1186-
} else {
1187-
cache_shard.shard(cache_key::cache_digest(config_settings))
1188-
};
1189-
11901134
// If the cache contains a compatible wheel, return it.
11911135
if let Some(built_wheel) = BuiltWheelMetadata::find_in_cache(tags, &cache_shard) {
11921136
return Ok(built_wheel);
@@ -1313,14 +1257,6 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
13131257
));
13141258
}
13151259

1316-
// If there are build settings, we need to scope to a cache shard.
1317-
let config_settings = self.build_context.config_settings();
1318-
let cache_shard = if config_settings.is_empty() {
1319-
cache_shard
1320-
} else {
1321-
cache_shard.shard(cache_key::cache_digest(config_settings))
1322-
};
1323-
13241260
// Otherwise, we need to build a wheel.
13251261
let task = self
13261262
.reporter

crates/uv-installer/src/plan.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use platform_tags::Tags;
1515
use pypi_types::{Requirement, RequirementSource, ResolverMarkerEnvironment};
1616
use uv_cache::{Cache, CacheBucket, WheelCache};
1717
use uv_cache_info::{CacheInfo, Timestamp};
18-
use uv_configuration::{BuildOptions, ConfigSettings, Reinstall};
18+
use uv_configuration::{BuildOptions, Reinstall};
1919
use uv_distribution::{
2020
BuiltWheelIndex, HttpArchivePointer, LocalArchivePointer, RegistryWheelIndex,
2121
};
@@ -57,15 +57,14 @@ impl<'a> Planner<'a> {
5757
build_options: &BuildOptions,
5858
hasher: &HashStrategy,
5959
index_locations: &IndexLocations,
60-
config_settings: &ConfigSettings,
6160
cache: &Cache,
6261
venv: &PythonEnvironment,
6362
markers: &ResolverMarkerEnvironment,
6463
tags: &Tags,
6564
) -> Result<Plan> {
6665
// Index all the already-downloaded wheels in the cache.
6766
let mut registry_index = RegistryWheelIndex::new(cache, tags, index_locations, hasher);
68-
let built_index = BuiltWheelIndex::new(cache, tags, hasher, config_settings);
67+
let built_index = BuiltWheelIndex::new(cache, tags, hasher);
6968

7069
let mut cached = vec![];
7170
let mut remote = vec![];

crates/uv/src/commands/pip/install.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,6 @@ pub(crate) async fn pip_install(
407407
link_mode,
408408
compile,
409409
&index_locations,
410-
config_settings,
411410
&hasher,
412411
&markers,
413412
&tags,

crates/uv/src/commands/pip/operations.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ use pypi_types::ResolverMarkerEnvironment;
2121
use uv_cache::Cache;
2222
use uv_client::{BaseClientBuilder, RegistryClient};
2323
use uv_configuration::{
24-
BuildOptions, Concurrency, ConfigSettings, Constraints, ExtrasSpecification, Overrides,
25-
Reinstall, Upgrade,
24+
BuildOptions, Concurrency, Constraints, ExtrasSpecification, Overrides, Reinstall, Upgrade,
2625
};
2726
use uv_dispatch::BuildDispatch;
2827
use uv_distribution::DistributionDatabase;
@@ -350,7 +349,6 @@ pub(crate) async fn install(
350349
link_mode: LinkMode,
351350
compile: bool,
352351
index_urls: &IndexLocations,
353-
config_settings: &ConfigSettings,
354352
hasher: &HashStrategy,
355353
markers: &ResolverMarkerEnvironment,
356354
tags: &Tags,
@@ -378,7 +376,6 @@ pub(crate) async fn install(
378376
build_options,
379377
hasher,
380378
index_urls,
381-
config_settings,
382379
cache,
383380
venv,
384381
markers,

crates/uv/src/commands/pip/sync.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,6 @@ pub(crate) async fn pip_sync(
359359
link_mode,
360360
compile,
361361
&index_locations,
362-
config_settings,
363362
&hasher,
364363
&markers,
365364
&tags,

crates/uv/src/commands/project/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,6 @@ pub(crate) async fn sync_environment(
807807
link_mode,
808808
compile_bytecode,
809809
index_locations,
810-
config_setting,
811810
&hasher,
812811
&markers,
813812
tags,
@@ -1040,7 +1039,6 @@ pub(crate) async fn update_environment(
10401039
*link_mode,
10411040
*compile_bytecode,
10421041
index_locations,
1043-
config_setting,
10441042
&hasher,
10451043
&markers,
10461044
tags,

0 commit comments

Comments
 (0)