C Modules imported into a Swift project using a module.modulemap file do not generate modules or generated interfaces correctly in Xcode

Originator:Josh.Lieberman92
Number:rdar://32143585 Date Originated:11-May-2017
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode Version 8.3.2 (8E2002)
Classification:UI/Usability Reproducible:Always
 
Summary:
Creating a module for a C header such as CommonCrypto.h or sqlite3.h does not resolve the module references properly.  This breaks autocomplete, erroneously shows "no such module" errors in Xcode (even though the project can run and compile correctly), and does not properly generate a Swift module or interface for the C header.

Steps to Reproduce:
1. Create a new Swift Xcode project
2. Import C headers using a module.modulemap file
3. Attempt to functions from the imported headers in code.

Expected Results:
I would expect Xcode to generate a Swift module correctly for the specified header files.

Actual Results:
Xcode does not generate a Swift module correctly for the specified header files, does not support autocomplete, and erroneously shows errors for modules that are correctly bridged.

Version:
Xcode Version 8.3.2 (8E2002)
macOS Sierra 10.12.4 (16E195)

Notes:


Configuration:


Attachments:
'modulemap.zip' was successfully uploaded.

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!