uv/crates/install-wheel-rs/src
Charlie Marsh f8fa887c0b
Use `Resolver` in `pip sync` (#2696)
## Summary

This PR removes the custom `DistFinder` that we use in `pip sync`. This
originally existed because `VersionMap` wasn't lazy, and so we saved a
lot of time in `DistFinder` by reading distribution data lazily. But
now, AFAICT, there's really no benefit. Maintaining `DistFinder` means
we effectively have to maintain two resolvers, and end up fixing bugs in
`DistFinder` that don't exist in the `Resolver` (like #2688.

Closes #2694.

Closes #2443.

## Test Plan

I ran this benchmark a bunch. It's basically a wash. Sometimes one is
faster than the other.

```
❯ python -m scripts.bench \
        --uv-path ./target/release/main \
        --uv-path ./target/release/uv \
        scripts/requirements/compiled/trio.txt --min-runs 50 --benchmark install-warm --warmup 25
Benchmark 1: ./target/release/main (install-warm)
  Time (mean ± σ):      54.0 ms ±  10.6 ms    [User: 8.7 ms, System: 98.1 ms]
  Range (min … max):    45.5 ms …  94.3 ms    50 runs

  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.

Benchmark 2: ./target/release/uv (install-warm)
  Time (mean ± σ):      50.7 ms ±   9.2 ms    [User: 8.7 ms, System: 98.6 ms]
  Range (min … max):    44.0 ms …  98.6 ms    50 runs

  Warning: The first benchmarking run for this command was significantly slower than the rest (77.6 ms). This could be caused by (filesystem) caches that were not filled until after the first run. You should consider using the '--warmup' option to fill those caches before the actual benchmark. Alternatively, use the '--prepare' option to clear the caches before each timing run.

Summary
  './target/release/uv (install-warm)' ran
    1.06 ± 0.29 times faster than './target/release/main (install-warm)'
```
2024-03-27 17:36:38 -04:00
..
lib.rs Use `Resolver` in `pip sync` (#2696) 2024-03-27 17:36:38 -04:00
linker.rs Ensure mtime of site packages is updated during wheel installation (#2545) 2024-03-20 00:54:05 +00:00
metadata.rs Loosen `.dist-info` validation to accept arbitrary versions (#2441) 2024-03-14 09:04:39 -04:00
record.rs Remove some unused code from `install-wheel-rs` (#2001) 2024-02-27 04:27:25 +00:00
script.rs Future-proof pip entrypoints special case (#1982) 2024-03-01 10:05:50 +01:00
uninstall.rs Close `RECORD` after reading entries during uninstall (#2259) 2024-03-07 04:35:22 +00:00
wheel.rs Use relative paths for user display (#2559) 2024-03-20 09:52:50 -04:00