MobileNativeFoundation/rules_xcodeproj

Bug: XCTest traces are missing in failure context

Opened this issue · 1 comments

Description

In Xcode 12+ a test case which calls into a function that then calls something like XCTFail/XCTAssert* has proper traces back up the stack to the originating caller. This helps diagnose where the test case failure is called. This happens automatically in a new Xcode 12+ project, for example:

Screenshot 2024-06-18 at 11 07 52 AM

The same code in a BwB rules_xcodeproj project only shows the trace for the XCTAssert:

Screenshot 2024-06-18 at 11 14 28 AM

Reproduction steps

Write a test which calls into some other function that then fails. Or see the attached zip with a vanilla Xcode and rules_xcodeproj example to reproduce the issue.

TestTracingExample.zip

Expected behavior

The test failures look like they do in vanilla Xcode

rules_xcodeproj version

2.4.0

Xcode version

15.4

Bazel version

7.2.0

rules_apple version

3.5.1

rules_swift version

1.18.0

Additional information

No response

This bug is extremely annoying, as it drastically complicates daily work with XCTest. Could it be prioritized ?