You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering a fatal error when running tests on a framework which depends on a Swift Package that is trying to load its resource bundle using `Bundle.module`. Attached is a sample project that can reproduce the error by running the tests on the PhoneEntryKit target.
Setup:
PhoneEntryKit framework depends on PhoneNumberKit Swift Package
PhoneEntryKitTest target uses PhoneNumberEntry app as its test host
PhoneEntryKit uses a type from PhoneNumberKit which attempts to load a resource from the resource bundle generated by Swift Package Manager.
Attachment: Download
Additional Detail from JIRA
md5: 494aa024e80ea736ccce56d26988d77a
Issue Description:
I'm encountering a fatal error when running tests on a framework which depends on a Swift Package that is trying to load its resource bundle using `Bundle.module`. Attached is a sample project that can reproduce the error by running the tests on the PhoneEntryKit target.
Setup:
PhoneEntryKit framework depends on PhoneNumberKit Swift Package
PhoneEntryKitTest target uses PhoneNumberEntry app as its test host
PhoneEntryKit uses a type from PhoneNumberKit which attempts to load a resource from the resource bundle generated by Swift Package Manager.
What happens:
The built products when running the tests in Xcode yields the xctest bundle inside of the test host's Plugins directory, but the generated accessor for `Bundle.module` doesn't account for that situation, which leads to the fatal error (https://github.com/apple/swift-package-manager/blob/1f2eda34deec3c92b97d116f192fd734657c4613/Sources/Build/BuildPlan.swift#L639).
I've tried this both in Xcode 12.4 as well as 12.5 beta 3.
The text was updated successfully, but these errors were encountered: