Comments (2)
We seem to spend a ton of time computing version intersections. I'll just copy an email I wrote to Jacob.
When we find ourselves testing many consecutive versions of a given package, the term intersection increases linearly. For example, after testing and rejecting Django 5.0a1, we have:
[ 0a0.dev0, 5.0a1 [ [ 5.0a1.post0.dev0, ∞ [
We then test Django 4.2.6, which gives us:
[ 0a0.dev0, 4.2.6 [ [ 4.2.6.post0.dev0, ∞ [
We then take the intersection of these terms, which gives us:
[ 0a0.dev0, 4.2.6 [ [ 4.2.6.post0.dev0, 5.0a1 [ [ 5.0a1.post0.dev0, ∞ [
This continues until we have a range like:
[ 0a0.dev0, 4.2rc1 [ [ 4.2rc1.post0.dev0, 4.2 [ [ 4.2.post0.dev0, 4.2.1 [ [ 4.2.1.post0.dev0, 4.2.2 [ [ 4.2.2.post0.dev0, 4.2.3 [ [ 4.2.3.post0.dev0, 4.2.4 [ [ 4.2.4.post0.dev0, 4.2.5 [ [ 4.2.5.post0.dev0, 4.2.6 [ [ 4.2.6.post0.dev0, 5.0a1 [ [ 5.0a1.post0.dev0, ∞ [
If you're testing hundreds of versions, the terms continue to grow, and I suspect this leads to quadratic behavior, since we're increasing the number of terms linearly with the number of tested versions?
The intersections aren't "wrong", and it's possible that we're doing something wrong with our version formulations -- but could we take advantage of the fact that we know there are no versions in these partial ranges?
For example, given [ 0a0.dev0, 5.0a1 [ [ 5.0a1.post0.dev0, ∞ [
and [ 0a0.dev0, 4.2.6 [ [ 4.2.6.post0.dev0, ∞ [
, it would be preferable to reduce to [ 0a0.dev0, 4.2.6 [
, if I'm understanding the syntax correctly.
from uv.
This is now better tracked in pubgrub-rs/pubgrub#135 and has improved a lot. I'm closing this in favor of opening specific issues for specific problems.
from uv.
Related Issues (20)
- Add link to documentation (docs.astral.sh/uv) HOT 4
- Add landing page for uv at `astral.sh/uv`
- `uv show` / `uv info`
- Inconsistent canonicalization of local wheel paths HOT 3
- Consider support for alternative for long help for `uvx`
- Hide Python options in `uv tool list` help
- Revisit LTO for ppc64le binaries HOT 4
- Support `editable: false` for workspace dependencies HOT 4
- Markers under universal resolution could have more concise representation HOT 1
- Project manager frontend HOT 1
- Remember previous lock options when running `uv sync` HOT 3
- `uv pip install "NAME @ git+https://URL"` prints extraneous warning HOT 5
- Feature request: Implement `pip download` HOT 4
- Feature request: Generate `requirements.txt` from `uv.lock` HOT 3
- (uv internal error) Failed to spawn the python child process.: The system cannot find the file specified. HOT 5
- Before executing ``uv python uninstall``, check if it is currently in use. HOT 1
- Software Bill of Materials (SBOM) output feature HOT 1
- `uv lock` rejects wheels from `--find-links`
- `uv sync` rejects source distributions from `--find-links`
- `uv lock` mixes registry results with `--find-links` over HTTP
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uv.