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 writing a Swift framework library that internally uses some private C and Objective-C functions and classes. For this purpose I'm defining a "private" modulemap for an explicit nested clang module that exposes the private headers. However, it seems that the Swift compiler (or the Swift language support in Xcode) does not properly handle the import and re-export of this explicit nested module.
The attached example Xcode workspace demonstrates the following three problems:
The private `PrivateClass` is available in TestFramework/File2.swift although `TestFramework.Private` is not imported in that file. It seems that the import in File1.swift also improperly affects File2.swift.
Similarly, TestProject/ViewController.swift can use `PrivateClass` even though the nested module `TestFramework.Private` wasn't imported in that project at all. This seems again to be a side-effect of TestFramework/File1.swift importing the nested module.
If the "Install Objective-C Compatibility Header" build setting for the framework is set to Yes, the build fails with the unhelpful error message "No such module 'TestFramework.Private'".
The text was updated successfully, but these errors were encountered:
Attachment: Download
Environment
Tested with Xcode 8.1 beta (8T46g).
Additional Detail from JIRA
md5: e69248e066e0d6cc0a96c839158559a8
Issue Description:
I'm writing a Swift framework library that internally uses some private C and Objective-C functions and classes. For this purpose I'm defining a "private" modulemap for an explicit nested clang module that exposes the private headers. However, it seems that the Swift compiler (or the Swift language support in Xcode) does not properly handle the import and re-export of this explicit nested module.
The attached example Xcode workspace demonstrates the following three problems:
The private `PrivateClass` is available in TestFramework/File2.swift although `TestFramework.Private` is not imported in that file. It seems that the import in File1.swift also improperly affects File2.swift.
Similarly, TestProject/ViewController.swift can use `PrivateClass` even though the nested module `TestFramework.Private` wasn't imported in that project at all. This seems again to be a side-effect of TestFramework/File1.swift importing the nested module.
If the "Install Objective-C Compatibility Header" build setting for the framework is set to Yes, the build fails with the unhelpful error message "No such module 'TestFramework.Private'".
The text was updated successfully, but these errors were encountered: