Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-experimental remote_download_regex flag #3125

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ bazel run //:xcodeproj -- 'build --remote_download_minimal --output_groups=all_t
This requires knowing the internal name of the generator target
(`//:xcodeproj.generator` in this example), and it also doesn’t apply some flags
that Xcode `bazel build` command applies (e.g.
`--experimental_remote_download_regex`). Instead, it’s recommended that you use
`--remote_download_regex`). Instead, it’s recommended that you use
the [`--generator_output_groups` option](#--generator_output_groups):

```
Expand Down Expand Up @@ -302,7 +302,7 @@ bazel run //:xcodeproj -- --config=swiftuipreviews --generator_output_groups=all

If the Bazel command is `build`, then this builds the specified generator
outputs groups, potentially adding additional flags to match the behavior of
Xcode’s `bazel build` (e.g. `--experimental_remote_download_regex`).
Xcode’s `bazel build` (e.g. `--remote_download_regex`).

<a id="output-groups"></a>
These are the available output groups to use:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ build_pre_config_flags=(
# This is brittle. If different file extensions are used for compilation
# inputs, they will need to be added to this list. Ideally we can stop doing
# this once Bazel adds support for a Remote Output Service.
"--experimental_remote_download_regex=.*\.indexstore/.*|.*\.(a|cfg|c|C|cc|cl|cpp|cu|cxx|c++|def|h|H|hh|hpp|hxx|h++|hmap|ilc|inc|inl|ipp|tcc|tlh|tli|tpp|m|modulemap|mm|pch|swift|swiftdoc|swiftmodule|swiftsourceinfo|yaml)$"
"--remote_download_regex=.*\.indexstore/.*|.*\.(a|cfg|c|C|cc|cl|cpp|cu|cxx|c++|def|h|H|hh|hpp|hxx|h++|hmap|ilc|inc|inl|ipp|tcc|tlh|tli|tpp|m|modulemap|mm|pch|swift|swiftdoc|swiftmodule|swiftsourceinfo|yaml)$"
)

apply_sanitizers=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ output_groups=(
"bc $BAZEL_TARGET_ID"
# Products (i.e. bundles) and index store data. The products themselves aren't
# used, they cause transitive files to be created. We use
# `--experimental_remote_download_regex` below to collect the files we care
# `--remote_download_regex` below to collect the files we care
# about.
"bp $BAZEL_TARGET_ID"
)
Expand Down Expand Up @@ -58,7 +58,7 @@ readonly build_pre_config_flags=(
# This is brittle. If different file extensions are used for compilation
# inputs, they will need to be added to this list. Ideally we can stop doing
# this once Bazel adds support for a Remote Output Service.
"--experimental_remote_download_regex=${indexstores_regex}.*|.*\.(cfg|c|C|cc|cl|cpp|cu|cxx|c++|def|h|H|hh|hpp|hxx|h++|hmap|ilc|inc|inl|ipp|tcc|tlh|tli|tpp|m|modulemap|mm|pch|swift|swiftdoc|swiftmodule|swiftsourceinfo|yaml)$"
"--remote_download_regex=${indexstores_regex}.*|.*\.(cfg|c|C|cc|cl|cpp|cu|cxx|c++|def|h|H|hh|hpp|hxx|h++|hmap|ilc|inc|inl|ipp|tcc|tlh|tli|tpp|m|modulemap|mm|pch|swift|swiftdoc|swiftmodule|swiftsourceinfo|yaml)$"
)

source "$BAZEL_INTEGRATION_DIR/bazel_build.sh"
Expand Down
2 changes: 1 addition & 1 deletion xcodeproj/internal/files/legacy_output_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def swift_to_outputs(swift):
return (
# We only need the single swiftmodule in order to download everything
# from the remote cache (because of
# `--experimental_remote_download_regex`). Reducing the number of
# `--remote_download_regex`). Reducing the number of
# items in an output group keeps the BEP small.
[module.swiftmodule],
getattr(module, "indexstore", None),
Expand Down
2 changes: 1 addition & 1 deletion xcodeproj/internal/templates/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ else
if [[ $cmd == "build" && -n "${generator_output_groups:-}" ]]; then
if [[ $download_intermediates -eq 1 ]]; then
pre_config_flags=(
"--experimental_remote_download_regex=.*\.indexstore/.*|.*\.(a|cfg|c|C|cc|cl|cpp|cu|cxx|c++|def|h|H|hh|hpp|hxx|h++|hmap|ilc|inc|inl|ipp|tcc|tlh|tli|tpp|m|modulemap|mm|pch|swift|swiftdoc|swiftmodule|swiftsourceinfo|yaml)$"
"--remote_download_regex=.*\.indexstore/.*|.*\.(a|cfg|c|C|cc|cl|cpp|cu|cxx|c++|def|h|H|hh|hpp|hxx|h++|hmap|ilc|inc|inl|ipp|tcc|tlh|tli|tpp|m|modulemap|mm|pch|swift|swiftdoc|swiftmodule|swiftsourceinfo|yaml)$"
)
else
pre_config_flags=()
Expand Down