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

rules_apple reuses artefacts built for different SDK versions #2357

Closed
bgeron opened this issue Jan 9, 2024 · 2 comments
Closed

rules_apple reuses artefacts built for different SDK versions #2357

bgeron opened this issue Jan 9, 2024 · 2 comments

Comments

@bgeron
Copy link

bgeron commented Jan 9, 2024

Today my build broke because of a poisoned cache. With the cache I had, Bazel/rules_apple was trying to reuse build artefacts built with iOS SDK 17.0, while building for iOS SDK 17.2, which failed the build. Rerunning Bazel did not prompt the creation of fixed artefacts for dependencies.

My colleague hit the same issue independently. I couldn't figure out how to clear my Bazel cache selectively to fix this; we both ended up clearing all cache.

We have some upstream dependencies in our tree which have minimum_os_version = "17.0". For our own codebase, we have minimum_os_version = "17.2".

I threw away my logs before my colleague prompted me to make a ticket, so this is all largely from memory. I think this was the sequence of events, with lots of time elapsing between (2) and (3).

  1. Upgrade Xcode (to 15.1)
  2. Select Xcode15.1 command line tools
  3. Build our project with Bazel. This fails at a later stage because minimum_os_version = "17.2" cannot be met.
  4. Open Xcode for the first time, to download and install the included iOS 17.2 SDK.
  5. Rebuild our project with Bazel.
  6. Get an error about not being able to compile with SDK 17.2 against dependency artefacts that were built for SDK 17.0.
  7. Remove all Bazel's caches and rebuild. This succeeds.
@brentleyjones
Copy link
Collaborator

Were these swiftmodule's that had the incorrect version? If so, I think this might be bazelbuild/rules_swift#1126.

@bgeron
Copy link
Author

bgeron commented Jan 9, 2024

Yes, they were. Looks like this is a probably duplicate, thanks!

@bgeron bgeron closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2024
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

No branches or pull requests

2 participants