Unit Test targets should have "Always Embed Swift Libraries" enabled by default

Originator:jalkut
Number:rdar://30832983 Date Originated:03-Mar-2017 12:03 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Version 8.3 beta 3 (8W132p)
Classification:UI/Usability Reproducible:Always
 
Summary:
As existing Apple developers transition from Objective C to Swift, more and more of us will run into situations where we add a Swift dependency to unit tested code, and witness the unit testing target fails to run because of missing Swift libraries.

Because a Unit Test target is not designed to be shipped, and because the CopySwiftLibs build phase has no effect in the absence of linked Swift binaries, there is little to no risk in enabling the "Always Embed" option for Unit Test targets.

I think that flipping this switch to on by default will save developers time and frustration.

Steps to Reproduce:


Expected Results:


Actual Results:


Version:
Version 8.3 beta 3 (8W132p)

Notes:


Configuration:


Attachments:

Comments

(To clarify: if Xcode were to run Unit Test targets in an environment that has all Swift support libraries in the library search path, then there would be no need for Unit Test bundles to worry about either embedding Swift libraries, or ensuring that the correct ones do get embedded.

Added to the bug report:

Perhaps even simpler: Unit Test bundles should always be executed in an environment that includes the full suite of Swift libraries in DYLD's library search path?


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!