bazelbuild / bazelbuild/rules_apple

iOS app has a runtime crash when upgrading from Bazel 6.4 to Bazel 7.1.2

Open
#2,514 1 comment 0 reactions 2 assignees Assigned to @sgowroji View on GitHub
type: bug
Dominant language
Starlark
Stars
593
Forks
334
Avg merge
16h 48m
Merged PRs (30d)
9

Description

### Description of the bug:

After upgrading Bazel from 6.4 to 7.1.2, iOS app has a runtime crash. Here are more details:

* It crashed on one commercial xxxSDK. It is a commercial SDK, so we did not have their source code. we only have their SDK library. we did not build it from the source code, just use rules_apple's [apple_dynamic_framework_import](https://github.com/bazelbuild/rules_apple/blob/efcae11d72429e99ff0a28f155a1a3f62d01a5fb/apple/apple.bzl#L51) to import it

* I dump the action graph of xxxSDK of Bazel 6.4 vs Bazel 7.1.2, no much different. Bazel 6.4 only have one more extra ExecutionInfo: {requires-darwin: '', supports-xcode-requirements-set: ''} ,

* No rules_apple change, no build from source code. so something is wrong with linking

* However, in our Bazel 7.1.2 PR, there is no linking flag change. Is it possible something has changed in Bazel 7.1.2 itself?

* Other company had the similar crash issue during linking, but on a different scenario

* to use Emerge tool, to see about 200K size reduction when comparing Bazel 6.4 by Bazel 7.1.2 build.

* Went through the changelog of Bazel 7.0, Does see some changes of ObjC, and xxxSDK is ObjC library. but not sure which could have caused the crash.

### Which category does this issue belong to?

Objective-C Rules

### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Since this is a commercial SDK library, and only happened on one functionality in our app, not sure how to provide an example to reproduce it.

### Which operating system are you running Bazel on?

macOS 14.5

### What is the output of `bazel info release`?

release 7.1.2

### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.

_No response_

### What's the output of `git remote get-url origin; git rev-parse HEAD` ?

```text
return our internal git repo, and commit sha.
```

### If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

_No response_

### Have you found anything relevant by searching the web?

we have some discussion about this issue on two slack channel:

https://ios-dev-at-scale.slack.com/archives/CBVEC7KRQ/p1724283963037899

and

https://bazelbuild.slack.com/archives/CD3QY5C2X/p1724284117717189

### Any other information, logs, or outputs that you want to share?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.