Commit 98be335
authored
[move-package] Support dependency overrides (#11181)
## Description
When building a dependency graph, different versions of the same
(transitively) dependent package can be encountered. If this is indeed
the case, a single version must be chosen by the developer to be the
override, and this override must be specified in a manifest file whose
package dominates all the conflicting "uses" of the dependent package.
These overrides must taken into consideration during the dependency
graph construction and this PR implements the relevant changes to
dependency graph construction algorithm. For additional details see the
doc-comments in the code as well as the PR this one is based on
(move-language/move#1023) which contains a
discussion of issues encountered during development of this algorithm.
## Test Plan
A comprehensive test suite is attached.
---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.
### Type of Change (Check all that apply)
- [x] user-visible impact
### Release notes
This change allows a developer to override transitive dependencies of a
package they are developing to avoid conflicts that could otherwise
arise.1 parent 288186e commit 98be335
File tree
164 files changed
+4833
-160
lines changed- external-crates/move/tools/move-package
- src
- resolution
- source_package
- tests
- test_sources
- dep_dev_dep_diamond
- dep_good_digest
- diamond_problem_backflow_resolution
- diamond_problem_dep_conflict
- deps_only
- A
- B
- C
- diamond_problem_dep_external_conflict
- deps_only
- ADep
- A
- B
- diamond_problem_dep_external_incorrect_override_v1
- deps_only
- ADep
- A
- B
- C
- diamond_problem_dep_external_incorrect_override_v2
- deps_only
- ADep
- A
- B
- C
- diamond_problem_dep_external_no_conflict
- deps_only
- ADep
- A
- B
- diamond_problem_dep_external_override_root
- deps_only
- ADep
- A
- B
- C
- diamond_problem_dep_external_override
- deps_only
- ADep
- A
- B
- diamond_problem_dep_incorrect_conflicting_overrides
- deps_only
- A
- B
- C
- D
- diamond_problem_dep_incorrect_override_cycle
- deps_only
- A
- B
- C
- D
- E
- diamond_problem_dep_incorrect_override_empty
- deps_only
- A
- B
- C
- D
- diamond_problem_dep_incorrect_override_occupied
- deps_only
- A
- B
- C
- D
- diamond_problem_dep_nested_conflict
- deps_only
- A
- B
- C
- D
- E
- F
- G
- diamond_problem_dep_nested_override_insufficient_low
- deps_only
- A
- B
- C
- D
- E
- diamond_problem_dep_nested_override
- deps_only
- A
- B
- C
- D
- E
- diamond_problem_dep_override
- deps_only
- A
- B
- C
- diamond_problem_dep_transitive_nested_override
- deps_only
- A
- B1
- B2
- C
- D
- E
- diamond_problem_dep_two_nested_overrides
- deps_only
- A
- B
- C
- D
- E
- diamond_problem_dep_with_deps_conflict
- deps_only
- A
- B
- C1
- C2
- D
- E
- diamond_problem_dep_with_deps
- deps_only
- A
- B
- C1
- C2
- D
- E
- diamond_problem_no_conflict
- external_bad_dep
- external_dev_dep
- external_overlap
- external_silent
- external
- multiple_deps_rename
- nested_deps_git_local
- nested_deps_override
- deps_only/nested
- more
- one_dep_assigned_address
- one_dep_multiple_of_same_name
- one_dep_override
- deps_only/other_dep
- sources
- sources
- one_dep_reassigned_address
- one_dep_unification_across_local_renamings
- one_dep
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
164 files changed
+4833
-160
lines changedLines changed: 475 additions & 111 deletions
Large diffs are not rendered by default.
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
337 | 342 | | |
338 | 343 | | |
339 | 344 | | |
| |||
350 | 355 | | |
351 | 356 | | |
352 | 357 | | |
353 | | - | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
354 | 362 | | |
355 | 363 | | |
356 | 364 | | |
| |||
433 | 441 | | |
434 | 442 | | |
435 | 443 | | |
| 444 | + | |
436 | 445 | | |
437 | 446 | | |
438 | 447 | | |
| |||
502 | 511 | | |
503 | 512 | | |
504 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
505 | 521 | | |
506 | 522 | | |
507 | 523 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
157 | | - | |
| 159 | + | |
158 | 160 | | |
159 | 161 | | |
160 | 162 | | |
| |||
Lines changed: 32 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
188 | 196 | | |
189 | 197 | | |
190 | 198 | | |
| |||
214 | 222 | | |
215 | 223 | | |
216 | 224 | | |
217 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
218 | 234 | | |
219 | 235 | | |
220 | 236 | | |
| |||
243 | 259 | | |
244 | 260 | | |
245 | 261 | | |
246 | | - | |
| 262 | + | |
247 | 263 | | |
248 | 264 | | |
249 | 265 | | |
| |||
267 | 283 | | |
268 | 284 | | |
269 | 285 | | |
270 | | - | |
| 286 | + | |
271 | 287 | | |
272 | 288 | | |
273 | 289 | | |
| |||
295 | 311 | | |
296 | 312 | | |
297 | 313 | | |
298 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
299 | 323 | | |
300 | 324 | | |
301 | 325 | | |
| |||
319 | 343 | | |
320 | 344 | | |
321 | 345 | | |
322 | | - | |
| 346 | + | |
323 | 347 | | |
324 | 348 | | |
325 | 349 | | |
| |||
347 | 371 | | |
348 | 372 | | |
349 | 373 | | |
350 | | - | |
| 374 | + | |
351 | 375 | | |
352 | 376 | | |
353 | 377 | | |
| |||
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| 96 | + | |
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
| |||
142 | 146 | | |
143 | 147 | | |
144 | 148 | | |
| 149 | + | |
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
| |||
154 | 159 | | |
155 | 160 | | |
156 | 161 | | |
| 162 | + | |
157 | 163 | | |
158 | 164 | | |
159 | 165 | | |
| |||
189 | 195 | | |
190 | 196 | | |
191 | 197 | | |
| 198 | + | |
192 | 199 | | |
193 | 200 | | |
194 | 201 | | |
| |||
266 | 273 | | |
267 | 274 | | |
268 | 275 | | |
269 | | - | |
| 276 | + | |
270 | 277 | | |
271 | 278 | | |
272 | 279 | | |
273 | 280 | | |
| 281 | + | |
274 | 282 | | |
275 | 283 | | |
276 | 284 | | |
277 | 285 | | |
278 | 286 | | |
279 | | - | |
| 287 | + | |
280 | 288 | | |
281 | 289 | | |
282 | 290 | | |
283 | 291 | | |
| 292 | + | |
284 | 293 | | |
285 | 294 | | |
286 | 295 | | |
287 | 296 | | |
288 | 297 | | |
289 | 298 | | |
290 | 299 | | |
291 | | - | |
| 300 | + | |
292 | 301 | | |
293 | 302 | | |
294 | 303 | | |
295 | 304 | | |
| 305 | + | |
296 | 306 | | |
297 | 307 | | |
298 | 308 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | | - | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| 121 | + | |
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
| |||
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| |||
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
| 129 | + | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
| |||
171 | 175 | | |
172 | 176 | | |
173 | 177 | | |
| 178 | + | |
174 | 179 | | |
175 | 180 | | |
176 | 181 | | |
| |||
238 | 243 | | |
239 | 244 | | |
240 | 245 | | |
241 | | - | |
| 246 | + | |
242 | 247 | | |
243 | 248 | | |
244 | 249 | | |
245 | 250 | | |
| 251 | + | |
246 | 252 | | |
247 | 253 | | |
248 | 254 | | |
249 | 255 | | |
250 | 256 | | |
251 | | - | |
| 257 | + | |
252 | 258 | | |
253 | 259 | | |
254 | 260 | | |
| |||
259 | 265 | | |
260 | 266 | | |
261 | 267 | | |
| 268 | + | |
262 | 269 | | |
263 | 270 | | |
264 | 271 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments