swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.58k stars 10.36k forks source link

[SR-2093] Can't build frameworks (Unknown type name dispatch_qos_class_t) #44701

Open drewcrawford opened 8 years ago

drewcrawford commented 8 years ago
Previous ID SR-2093
Radar None
Original Reporter @drewcrawford
Type Bug

Attachment: Download

Environment Xcode Version 8.0 beta 2 (8S162m)
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, ClangImporter | |Assignee | None | |Priority | Medium | md5: db3702c9c21319ec71651cf5e41362e9

Issue Description:

Swift frameworks can't be built in Xcode.

I have traced the issue down to something involving trying to import Cocoa (or anything nontrivial) from an umbrella header, so it's not an Xcode bug. I think this is importer, somebody correct me if I'm wrong.

1. Create a new OSX framework in Xcode

  1. Add a swift file
  2. Cmd+B
/Users/drew/Code/SierraFramework2/SierraFramework2/SierraFramework2.h:9:9: While building module 'Cocoa' imported from /Users/drew/Code/SierraFramework2/SierraFramework2/SierraFramework2.h:9:

/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:9: While building module 'Foundation' imported from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:

/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10: While building module 'CoreFoundation' imported from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:

/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:15:10: While building module 'Dispatch' imported from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:15:

/Users/drew/Code/SierraFramework2/<module-includes>:1:9: In file included from <module-includes>:1:

/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/dispatch/dispatch.h:67:10: In file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/dispatch/dispatch.h:67:

/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/dispatch/block.h:244:3: Unknown type name 'dispatch_qos_class_t'; did you mean 'dispatch_block_flags_t'?

This is abbreviated, full logs are attached.

drewcrawford commented 8 years ago

This looks like it might be resolved in Xcode 8 beta 3.

@shahmishal will we get a preview 3 tag to correspond to the Xcode beta?

ec882e32-f2b6-4d2a-849c-98d6c7df0cfb commented 7 years ago

Is this issue already resolved? If so, we should close it.