Commit e2799da
authored
improve and simplify validation of target based dependencies (#3280)
motivation: SwiftPM 5.2 introduced target based dependencies which added complexity at code level and to users, this PR tries to both simplify the "rules" and the code
changes:
* allow target dependency in the form of ".product(name:, package:)" where package parameter is the last segment of the dependecy URL, which is the most intuitive choice
* change validation code to encourage the above from instead of encouraging adding "name" attibute to the dependency decleration, as we want to get away from adding this attribute in the long run
* add several tests that capture the numerous permutations we are coding for1 parent 53457c3 commit e2799da
5 files changed
Lines changed: 787 additions & 75 deletions
File tree
- Sources
- PackageGraph
- PackageModel
- Tests
- PackageGraphTests
- WorkspaceTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
145 | 144 | | |
146 | 145 | | |
147 | 146 | | |
| |||
414 | 413 | | |
415 | 414 | | |
416 | 415 | | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
434 | 421 | | |
435 | | - | |
| 422 | + | |
436 | 423 | | |
437 | 424 | | |
438 | 425 | | |
439 | 426 | | |
440 | | - | |
441 | | - | |
442 | | - | |
| 427 | + | |
| 428 | + | |
443 | 429 | | |
444 | 430 | | |
445 | 431 | | |
446 | | - | |
447 | | - | |
| 432 | + | |
448 | 433 | | |
449 | 434 | | |
450 | 435 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 24 | | |
28 | 25 | | |
29 | 26 | | |
| |||
37 | 34 | | |
38 | 35 | | |
39 | 36 | | |
40 | | - | |
41 | 37 | | |
42 | 38 | | |
43 | 39 | | |
| |||
173 | 169 | | |
174 | 170 | | |
175 | 171 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | 172 | | |
180 | 173 | | |
181 | 174 | | |
| |||
191 | 184 | | |
192 | 185 | | |
193 | 186 | | |
194 | | - | |
195 | 187 | | |
196 | 188 | | |
197 | 189 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
218 | 194 | | |
219 | | - | |
220 | 195 | | |
221 | 196 | | |
222 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
0 commit comments