Commit 6d28b81
authored
Fix .swiftsourceinfo readonly bugs in version 3+ (#1550)
Similar to #1533 but when using `--strategy=worker`
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 @com_github_apple_swift_argument_parser//...
--strategy=worker,local --worker_sandboxing=false` (pass)
- `git checkout master`
- `bazel build @com_github_apple_swift_argument_parser//...
--strategy=worker,local --worker_sandboxing=false` (failure)
- `git checkout <this-branch>`
- `bazel build @com_github_apple_swift_argument_parser//...
--strategy=worker,local --worker_sandboxing=false` (pass)1 parent 7445b2c commit 6d28b81
File tree
3 files changed
+33
-13
lines changed- tools/worker
3 files changed
+33
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
30 | 38 | | |
31 | 39 | | |
32 | 40 | | |
| |||
92 | 100 | | |
93 | 101 | | |
94 | 102 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | 103 | | |
107 | 104 | | |
108 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
95 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
| |||
153 | 159 | | |
154 | 160 | | |
155 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
156 | 174 | | |
157 | 175 | | |
158 | 176 | | |
159 | 177 | | |
160 | | - | |
| 178 | + | |
161 | 179 | | |
162 | 180 | | |
163 | 181 | | |
| |||
0 commit comments