Commit 943ca4b
authored
Only fetch swiftc target info when needed. (#8992)
We added fetching of the swift compiler version using swiftc
-print-target-info in the init of UserToolchain so that it can be passed
to the PrebuiltsManager to calculate the manifest and prebuilts zip file
names.
However, there are cases where we pass in the triple for the current SDK
which was intended to avoid the call to swiftc. We now call it all the
time which causes an extra call to swiftc that isn't always needed.
To address this, we make the calculation of the target info lazy and
move the call to fetch the swift version to the point we need it in the
PrebuiltsManager. If prebuilts aren't required, the call is avoided.
To properly test this we need to run a test that calls out to swiftc.
However, we don't have integration tests yet for prebuilts since they
would take a long time to execute. I have instead manually tested this
using a staged version of the prebuilts.1 parent 485f566 commit 943ca4b
File tree
3 files changed
+41
-19
lines changed- Sources
- PackageModel
- Workspace
3 files changed
+41
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
81 | 90 | | |
82 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
83 | 95 | | |
84 | 96 | | |
85 | 97 | | |
| |||
721 | 733 | | |
722 | 734 | | |
723 | 735 | | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
733 | | - | |
734 | | - | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
735 | 746 | | |
736 | 747 | | |
737 | 748 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | 168 | | |
170 | 169 | | |
171 | 170 | | |
| |||
175 | 174 | | |
176 | 175 | | |
177 | 176 | | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
184 | 183 | | |
185 | 184 | | |
186 | 185 | | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | 195 | | |
197 | 196 | | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
279 | 280 | | |
280 | 281 | | |
281 | 282 | | |
282 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
283 | 288 | | |
284 | 289 | | |
285 | 290 | | |
| |||
418 | 423 | | |
419 | 424 | | |
420 | 425 | | |
| 426 | + | |
421 | 427 | | |
422 | 428 | | |
423 | 429 | | |
424 | 430 | | |
425 | 431 | | |
426 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
427 | 437 | | |
428 | 438 | | |
429 | 439 | | |
| |||
597 | 607 | | |
598 | 608 | | |
599 | 609 | | |
| 610 | + | |
600 | 611 | | |
601 | 612 | | |
602 | 613 | | |
| |||
611 | 622 | | |
612 | 623 | | |
613 | 624 | | |
| 625 | + | |
614 | 626 | | |
615 | 627 | | |
616 | 628 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
581 | | - | |
582 | | - | |
| 581 | + | |
583 | 582 | | |
584 | 583 | | |
585 | 584 | | |
| |||
591 | 590 | | |
592 | 591 | | |
593 | 592 | | |
594 | | - | |
595 | 593 | | |
596 | 594 | | |
597 | 595 | | |
| 596 | + | |
598 | 597 | | |
599 | 598 | | |
600 | 599 | | |
| |||
0 commit comments