rules_xcodeproj
rules_xcodeproj copied to clipboard
Bug: Cache splits based on host platform
Describe the bug
Given the following declaration:
[
xcodeproj(
name = "xcodeproj-{0}-{1}".format(build_mode, ios_simulator_cpus),
build_mode = build_mode,
ios_simulator_cpus = ios_simulator_cpus,
...
)
for build_mode in [
"bazel",
"xcode",
]
for ios_simulator_cpus in [
"sim_arm64",
"x86_64",
]
]
Run this on an Intel-based Mac to populate to remote cache.
bazel run //:xcodeproj-bazel-sim_arm64 -- --build_output_groups all_targets
On an Apple silicon Mac, generate an Xcode project with:
bazel run //:xcodeproj-bazel-sim_arm64
Open it, build, and see a lot of cache misses.
(10:50:06) INFO: 2529 processes: 253 remote cache hit, 1132 internal, 1144 local.
Versions
- Bazel: 6.0.0-pre.20220804.3
- rules_xcodeproj: https://github.com/buildbuddy-io/rules_xcodeproj/commit/0f0ffa7c3d01c5316b8f7f4108ece051c8426c9b
- rules_apple: d04edf4136b4818662d7126582ec257aee372339
- rules_swift: 6153a848f747e90248a8673869c49631f1323ff3
The reason there are missies is because the simulator cpus are different for all of the other platforms. And even though they aren't used, they are part of the transition and affect the Starlark hash.
For now can you set a value for all simulators instead of just iOS?
It seems to work if I set a value for all simulators. Thanks.
(12:58:55) INFO: 2529 processes: 1380 remote cache hit, 1132 internal, 17 local.
Awesome! I think --platforms might help us here in the future. I'll look into it more post-1.0.