Commit d06beea
authored
Fix
#### Summary
Fix a bug in `generate_index_build_bazel_dependencies.sh` where the
`--remote_download_regex` pattern matches all files unconditionally,
defeating the purpose of selective downloads during Index Build.
#### Problem
The current regex:
```
--remote_download_regex=${indexstores_regex}.*|.*\.(cfg|c|C|cc|...)$
```
The `.*|` at the boundary acts as an unbounded wildcard. Due to regex OR
semantics, it matches every file before the alternation is even
evaluated. This means all remote cache outputs are downloaded locally
during Index Build, regardless of file extension.
The intent was to download only indexstores (matched by
`${indexstores_regex}`) and files with indexing-relevant extensions
(`.swiftmodule`, `.swiftdoc`, `.swift`, headers, etc.). Instead, every
output, including `.o` files, intermediate artifacts, and linked
binaries, is downloaded.
#### Fix
Remove the erroneous `.*|` so the regex correctly constrains downloads
to indexstores and listed extensions only:
```
--remote_download_regex=${indexstores_regex}.*\.(cfg|c|C|cc|...)$
```
#### Impact
In a large-scale monorepo, this bug caused Index Build's local storage
to grow from an expected few GB to over 1TB, as all remote cache outputs
were downloaded unconditionally. With the fix, only indexing-relevant
files are downloaded.
#### Related
- #3078
Signed-off-by: Ryo Aoyama <r.fe51028.r@gmail.com>--remote_download_regex matching all files unconditionally (#3301)1 parent ba7c9e7 commit d06beea
File tree
1 file changed
+1
-1
lines changed- xcodeproj/internal/bazel_integration_files
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
0 commit comments