Commit def32f3
authored
Ensure undeclared outputs are deleted when not tracked (#1533)
In rules_swift < 3.x the .swiftsourceinfo files are unconditionally
written to the module path. In rules_swift >= 3.x these same files are
no longer tracked by Bazel unless explicitly requested. When using
non-sandboxed mode, previous builds will contain these files and cause
build failures when Swift tries to use them, in order to work around
this compatibility issue, we check the module path for the presence of
.swiftsourceinfo files and if they are present but not requested, we
remove them.
Testing:
- `bazel clean --expunge`
- `git checkout 2.8.2`
- `bazel build //examples/... --spawn_strategy=local` (pass)
- `git checkout master`
- `bazel build //examples/... --spawn_strategy=local` (failure)
- `git checkout <this-branch>`
- `bazel build //examples/... --spawn_strategy=local` (pass)1 parent f172068 commit def32f3
File tree
3 files changed
+33
-0
lines changed- swift/toolchains/config
- tools/worker
3 files changed
+33
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
562 | 563 | | |
563 | 564 | | |
564 | 565 | | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
565 | 575 | | |
566 | 576 | | |
567 | 577 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
119 | 128 | | |
120 | 129 | | |
121 | 130 | | |
| |||
392 | 401 | | |
393 | 402 | | |
394 | 403 | | |
| 404 | + | |
| 405 | + | |
395 | 406 | | |
396 | 407 | | |
397 | 408 | | |
| |||
406 | 417 | | |
407 | 418 | | |
408 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
409 | 426 | | |
410 | 427 | | |
411 | 428 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
179 | 185 | | |
180 | 186 | | |
181 | 187 | | |
0 commit comments