Skip to content

build(bazel): re-upgrade rules_swift, rules_apple, apple_support#1163

Merged
aaylward merged 1 commit into
mainfrom
claude/grpc-1.82-upgrade-oy0edw
Jul 4, 2026
Merged

build(bazel): re-upgrade rules_swift, rules_apple, apple_support#1163
aaylward merged 1 commit into
mainfrom
claude/grpc-1.82-upgrade-oy0edw

Conversation

@aaylward

@aaylward aaylward commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #1162. These rules were downgraded in #1113 (rules_swift 3.5.0 → 3.4.2, rules_apple 4.4.0 → 4.3.3) only because rules_swift 3.5.0 required protobuf 34 while the repo was pinned to 33.5. With protobuf now on 35.1, the pin is gone, so move to the latest stable versions:

  • rules_swift: 3.4.23.6.1
  • rules_apple: 4.3.34.5.3
  • apple_support: 2.3.02.7.0

(4.0.0 / 5.0.0 of rules_swift / rules_apple exist only as RCs, so this stays on the stable lines.)

MODULE.bazel.lock registry hashes refreshed by module resolution.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Jw99o89a2UYe9NKLE9zGUx


Generated by Claude Code

These were downgraded in #1113 (rules_swift 3.5.0 -> 3.4.2,
rules_apple 4.4.0 -> 4.3.3) only because rules_swift 3.5.0 required
protobuf 34 while the repo was pinned to 33.5. With protobuf on 35.1
since #1162 the pin is gone, so move to the latest stable versions:

- rules_swift 3.4.2 -> 3.6.1
- rules_apple 4.3.3 -> 4.5.3
- apple_support 2.3.0 -> 2.7.0

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jw99o89a2UYe9NKLE9zGUx
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
1d4-web 0f0a4f9 Commit Preview URL

Branch Preview URL
Jul 04 2026, 04:27 PM

@aaylward aaylward merged commit a3274b8 into main Jul 4, 2026
12 checks passed
@aaylward aaylward deleted the claude/grpc-1.82-upgrade-oy0edw branch July 4, 2026 16:50
aaylward pushed a commit that referenced this pull request Jul 4, 2026
rules_apple 4.5.3 / apple_support 2.7.0 (upgraded in #1163) support
Bazel 9 (rules_apple#2863 was fixed by rules_apple#2868 and
apple_support#497), so the Bazel 8 workarounds can go:

- drop tags = ["manual"] and the stale Bazel 9 comments from the
  wordchains_ios targets; target_compatible_with already keeps them
  off Linux runs, and diff-build passes
  --skip_incompatible_explicit_targets
- remove the USE_BAZEL_VERSION=8.2.1 pin from release-wordchains-ios
- build the iOS app and run ios_unit_test with bazel in the test-ios
  macOS job, behind the existing wordchains path filter

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jw99o89a2UYe9NKLE9zGUx
aaylward added a commit that referenced this pull request Jul 4, 2026
* build(ios): enable iOS bazel targets on Bazel 9 and mac CI

rules_apple 4.5.3 / apple_support 2.7.0 (upgraded in #1163) support
Bazel 9 (rules_apple#2863 was fixed by rules_apple#2868 and
apple_support#497), so the Bazel 8 workarounds can go:

- drop tags = ["manual"] and the stale Bazel 9 comments from the
  wordchains_ios targets; target_compatible_with already keeps them
  off Linux runs, and diff-build passes
  --skip_incompatible_explicit_targets
- remove the USE_BAZEL_VERSION=8.2.1 pin from release-wordchains-ios
- build the iOS app and run ios_unit_test with bazel in the test-ios
  macOS job, behind the existing wordchains path filter

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jw99o89a2UYe9NKLE9zGUx

* fix(ios): constrain wordchains_ios targets to os:ios, not os:macos

Under Bazel 9 the Apple rules transition to real target platforms
(ios_sim_arm64, whose OS constraint is os:ios), so os:macos marked the
ios_application incompatible with its own platform:

  target platform (@@apple_support+//platforms:ios_sim_arm64) didn't
  satisfy constraint @@platforms//os:osx

The constraint only existed to keep Linux CI off these targets, and
os:ios still does that (linux doesn't satisfy it) while matching the
iOS transition. Bazel 8 didn't use real platforms for Apple builds,
which is why os:macos used to pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jw99o89a2UYe9NKLE9zGUx

* fix(ios): keep manual tag on Apple bundling targets for Linux CI

The Apple bundling rules (ios_application, ios_unit_test) transition to
an iOS target platform before target_compatible_with is evaluated, so
os:ios is satisfied on Linux too and diff-build's
--skip_incompatible_explicit_targets never kicks in — analysis fails
resolving @bazel_tools//tools/cpp:toolchain_type for iOS instead:

  No matching toolchains found for types:
    @@bazel_tools//tools/cpp:toolchain_type

Restore tags = ["manual"] on those two targets (diff-build queries
exclude manual) with a comment explaining the real reason. The mac
test-ios job and the release workflow request them by explicit label,
which builds manual targets. The plain swift_library targets don't
transition, so os:ios correctly skips them on Linux.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jw99o89a2UYe9NKLE9zGUx

* fix(ios): ios_unit_test is host-configured; constrain to os:macos

ios_application transitions its own top-level platform to iOS, but
ios_unit_test stays in the host configuration and only transitions its
deps, so os:ios made it incompatible on the mac runner:

  target platform (@@platforms//host:host) didn't satisfy constraint
  @@platforms//os:ios

The app build step passed on Bazel 9; this unblocks the test step.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jw99o89a2UYe9NKLE9zGUx

* fix(ios): enable swift testability for bazel ios_unit_test in CI

The repo builds with --compilation_mode=opt, where rules_swift disables
-enable-testing by default (it is only on for dbg/fastbuild), so the
@testable import in WordGraphTests failed with "module 'WordChains' was
not compiled for testing". SwiftPM's swift test builds debug, which is
why the existing test step never hit this.

Pass --features=swift.enable_testing on the CI test invocation only,
leaving the app and release builds without testability.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jw99o89a2UYe9NKLE9zGUx

* fix(ios): pin simulator device for bazel ios_unit_test

The test bundle now builds and runs, but the default test runner
created a "New-iPhone 6s Plus-26.5" simulator - an iPhone 6s Plus
paired with the latest iOS 26.5 runtime, which that device type cannot
run - and the tests exited with 15 before executing. Pass
--ios_simulator_device="iPhone 16" so a valid device/runtime pair is
used.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jw99o89a2UYe9NKLE9zGUx

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants