Cyclic dependency for framework matching system header name
| Originator: | robnapier | ||
| Number: | rdar://17803746 | Date Originated: | 24-Jul-2014 08:10 PM |
| Status: | Resolved: | ||
| Product: | Swift | Product Version: | 6beta4 |
| Classification: | Reproducible: |
Summary: A framework named "Signal" can cause Swift to fail with a cyclic dependency. Steps to Reproduce: Create an iOS framework in Swift called Signal Add an ObjC file called Something In Something.h, import Foundation In Signal.h, import <Signal/Something.h> Build Expected Results: Should build successfully or provide a clear error Actual Results: Generates a parse error (below). In more complex projects it can crash the compiler (attached). /Applications/Xcode6-Beta4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h:8:9: Cyclic dependency in module 'Darwin': Darwin -> Signal -> UIKit -> Darwin /tmp/Signal/Signal/Something.h:9:9: While building module 'Foundation' imported from /tmp/Signal/Signal/Something.h:9: /Applications/Xcode6-Beta4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10: While building module 'CoreFoundation' imported from /Applications/Xcode6-Beta4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6: /Applications/Xcode6-Beta4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:11:10: While building module 'Darwin' imported from /Applications/Xcode6-Beta4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:11: /Applications/Xcode6-Beta4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/usr/include/libc.h:50:10: While building module 'Signal' imported from /Applications/Xcode6-Beta4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/usr/include/libc.h:50: /tmp/Signal/Signal/Signal.h:9:9: While building module 'UIKit' imported from /tmp/Signal/Signal/Signal.h:9: /tmp/Signal/<module-includes>:1:9: In file included from <module-includes>:1: /Applications/Xcode6-Beta4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:9: In file included from /Applications/Xcode6-Beta4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
Comments
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!