Avatar for the astral-sh user
astral-sh
uv
BlogDocsChangelog

uv-resolver: fix basic case of overlapping markers

#5488Merged
Comparing
ag/overlapping-markers-basic
(
634f003
) with
main
(
6901a14
)
CodSpeed Performance Gauge
+1%
Improvements
0
Regressions
0
Untouched
13
New
0
Dropped
0
Ignored
0

Benchmarks

Passed

wheelname_tag_compatibility[flyte-short-incompatible]
crates/bench/benches/distribution_filename.rs::distribution_filename::benchmark_wheelname_tag_compatibility::wheelname_tag_compatibility[flyte-short-incompatible]
CodSpeed Performance Gauge
+3%
1,019.4 ns
990.3 ns
wheelname_tag_compatibility[flyte-long-incompatible]
crates/bench/benches/distribution_filename.rs::distribution_filename::benchmark_wheelname_tag_compatibility::wheelname_tag_compatibility[flyte-long-incompatible]
CodSpeed Performance Gauge
+2%
1.5 µs
1.4 µs
resolve_warm_jupyter
crates/bench/benches/uv.rs::uv::resolve_warm_jupyter::resolve_warm_jupyter
CodSpeed Performance Gauge
+2%
95.2 ms
93.6 ms
wheelname_tag_compatibility[flyte-short-compatible]
crates/bench/benches/distribution_filename.rs::distribution_filename::benchmark_wheelname_tag_compatibility::wheelname_tag_compatibility[flyte-short-compatible]
CodSpeed Performance Gauge
+1%
2.1 µs
2.1 µs
wheelname_tag_compatibility[flyte-long-compatible]
crates/bench/benches/distribution_filename.rs::distribution_filename::benchmark_wheelname_tag_compatibility::wheelname_tag_compatibility[flyte-long-compatible]
CodSpeed Performance Gauge
+1%
2.1 µs
2.1 µs
resolve_warm_airflow
crates/bench/benches/uv.rs::uv::resolve_warm_airflow::resolve_warm_airflow
CodSpeed Performance Gauge
+1%
1.1 s
1 s
wheelname_parsing[flyte-short-compatible]
crates/bench/benches/distribution_filename.rs::distribution_filename::benchmark_wheelname_parsing::wheelname_parsing[flyte-short-compatible]
CodSpeed Performance Gauge
0%
6.3 µs
6.2 µs
wheelname_parsing[flyte-short-incompatible]
crates/bench/benches/distribution_filename.rs::distribution_filename::benchmark_wheelname_parsing::wheelname_parsing[flyte-short-incompatible]
CodSpeed Performance Gauge
0%
6.3 µs
6.3 µs
wheelname_parsing[flyte-long-compatible]
crates/bench/benches/distribution_filename.rs::distribution_filename::benchmark_wheelname_parsing::wheelname_parsing[flyte-long-compatible]
CodSpeed Performance Gauge
0%
9.9 µs
9.9 µs
wheelname_parsing[flyte-long-incompatible]
crates/bench/benches/distribution_filename.rs::distribution_filename::benchmark_wheelname_parsing::wheelname_parsing[flyte-long-incompatible]
CodSpeed Performance Gauge
0%
12.6 µs
12.6 µs
build_platform_tags[burntsushi-archlinux]
crates/bench/benches/distribution_filename.rs::distribution_filename::benchmark_build_platform_tags::build_platform_tags[burntsushi-archlinux]
CodSpeed Performance Gauge
0%
1.3 ms
1.3 ms
wheelname_parsing_failure[flyte-short-extension]
crates/bench/benches/distribution_filename.rs::distribution_filename::benchmark_wheelname_parsing_failure::wheelname_parsing_failure[flyte-short-extension]
CodSpeed Performance Gauge
-2%
1.9 µs
1.9 µs
wheelname_parsing_failure[flyte-long-extension]
crates/bench/benches/distribution_filename.rs::distribution_filename::benchmark_wheelname_parsing_failure::wheelname_parsing_failure[flyte-long-extension]
CodSpeed Performance Gauge
-2%
1.8 µs
1.9 µs

Commits

Click on a commit to change the comparison range
Base
main
6901a14
+1%
uv-resolver: fix basic case of overlapping markers Consider the following packse scenario: ```toml [root] requires = [ "a>=1.0.0 ; python_version < '3.10'", "a>=1.1.0 ; python_version >= '3.10'", "a>=1.2.0 ; python_version >= '3.11'", ] [packages.a.versions."1.0.0"] [packages.a.versions."1.1.0"] [packages.a.versions."1.2.0"] ``` On current `main`, this produces a dependency on `a` that looks like this: ```toml dependencies = [ { name = "fork-overlapping-markers-basic-a", marker = "python_version < '3.10' or python_version >= '3.11'" }, ] ``` But the marker expression is clearly wrong here, since it implies that `a` isn't installed at all for Python 3.10. With this PR, the above dependency becomes: ```toml dependencies = [ { name = "fork-overlapping-markers-basic-a" }, ] ``` That is, it's unconditional. Which is I believe correct here since there aren't any other constraints on which version to select. The specific bug here is that when we found overlapping dependency specifications for the same package *within* a pre-existing fork, we intersected all of their marker expressions instead of unioning them. That in turn resulted in incorrect marker expressions. While this doesn't fix any known bug on the issue tracker (like #4640), it does appear to fix a couple of our snapshot tests. And fixes a basic test case I came up with while working on #4732. For the packse scenario test: https://github.com/astral-sh/packse/pull/206
634f003
6 months ago
by BurntSushi
Home Terms PrivacyDocs