Repository navigation
Commit 9a04b8f
authored
Omit redundant runtime constraints from lockfiles (#22004)
## Summary
With `resolution-inputs`, omit redundant runtime constraints from
`uv.lock`. We can omit a plain version bound when every locked version
of its package is stable and satisfies it. For example, changing `foo<3`
to `foo<4` can keep a locked `foo==2` without rewriting the lockfile.
We apply this rule to each constraint separately, and retain constraints
tied to specific sources, constraints that enable pre-releases, and a
few other cases. An extra-marked constraint can be omitted when its
bound satisfies the rule; otherwise, keeping the declaration lets
unchanged inputs reuse the lock without reconstructing the original
extra context.1 parent 89d689b commit 9a04b8f
6 files changed
Lines changed: 2211 additions & 268 deletions
File tree
- crates
- uv-dev/src
- uv-lock/src/lock
- uv-preview/src
- uv/tests
- lock
- tool
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | | - | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
| |||
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
37 | 85 | | |
38 | 86 | | |
39 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2632 | 2632 | | |
2633 | 2633 | | |
2634 | 2634 | | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
| 2639 | + | |
2635 | 2640 | | |
2636 | 2641 | | |
2637 | 2642 | | |
| |||
4101 | 4106 | | |
4102 | 4107 | | |
4103 | 4108 | | |
| 4109 | + | |
4104 | 4110 | | |
4105 | 4111 | | |
4106 | 4112 | | |
4107 | 4113 | | |
4108 | 4114 | | |
4109 | | - | |
| 4115 | + | |
| 4116 | + | |
| 4117 | + | |
| 4118 | + | |
| 4119 | + | |
| 4120 | + | |
| 4121 | + | |
| 4122 | + | |
| 4123 | + | |
| 4124 | + | |
| 4125 | + | |
4110 | 4126 | | |
4111 | 4127 | | |
4112 | | - | |
4113 | 4128 | | |
4114 | 4129 | | |
4115 | 4130 | | |
| |||
6074 | 6089 | | |
6075 | 6090 | | |
6076 | 6091 | | |
6077 | | - | |
| 6092 | + | |
| 6093 | + | |
| 6094 | + | |
| 6095 | + | |
| 6096 | + | |
6078 | 6097 | | |
6079 | 6098 | | |
6080 | 6099 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
| |||
0 commit comments