bazel-ios / rules_ios

Bazel rules for building iOS applications and frameworks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[xcodeproj] Support Xcode 14.x new index path

mattrobmattrob opened this issue · comments

Xcode 13: .../DerivedData/Foo-xxx/Index/DataStore
Xcode 14: .../DerivedData/Foo-xxx/Index.noindex/DataStore

Based on:

https://github.com/buildbuddy-io/rules_xcodeproj/blob/fd9180103d9917950acca12ff19959cc3e793921/xcodeproj/internal/bazel_integration_files/import_indexstores.sh#L109-L121

We can likely switch to INDEX_DATA_STORE_DIR to be version agnostic and it's also probably useful to pass -undo-rules_swift-renames to index-import.

@mattrobmattrob I don't have a lot of context on -undo-rules_swift-renames but based on this IIUC Until Bazel 6.0.0 means that this is useful on older versions of Bazel only right? Meaning that since rules_ios is now on Bazel 6.x we don't get much from this flag?

Because we have affordances like:

bazel_version = _get_bazel_version()
if bazel_version.major == "5":
# LTS support. Some of our third party deps from bazelbuild org don't
# support LTS but from time to time we'll evaluate supporting this to
# allow us to all run on HEAD
# For rules_apple, we maintain a tag rules_ios_1.0
_maybe(
github_repo,
name = "build_bazel_rules_apple",
ref = "78476e542160be2c32d467ef856ccc2e9152f187",
project = "bazelbuild",
repo = "rules_apple",
sha256 = "320e24459a03f6be2fa1986e6d973465e32e38e478e16cc2b1124a0d4a1bce42",
)

Seems reasonable to make it Bazel 5 & 6 capable where possible. But not sure on that specific flag, was just making sure it was recorded to try to figure it out since it's supported by rules_xcodeproj. 👍

Resolved here: #661 open to suggestions/feedback if I missed anything.

Awesome job, @thiagohmcruz!