Skip to content

[5.0] [ClangImporter] If a submodule named 'Private' is missing, ask Clang #14679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jrose-apple
Copy link
Contributor

@jrose-apple jrose-apple commented Feb 16, 2018

Cherry-pick of #14673 to the 5.0 branch. Reviewed by @bcardosolopes.

rdar://problem/37553763

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test

…wiftlang#14673)

Previously the recommended pattern for having a "private" interface
for a public framework that was easy to strip out was to define an
explicit submodule named 'Private'. However, that makes it all too
easy to have dependencies from the public parts of the module on the
private parts, and other such problems. We're now recommending that
the private module map instead define a parallel module named with
"_Private" as a suffix. Clang already implemented this, but Swift
didn't get the same treatment.

This fix tries to avoid hardcoding too much; it notes that this kind
of remapping is limited to the name 'Private' as the second component
of a module hierarchy, but doesn't actually encode the mapping with the
"_Private" suffix.

rdar://problem/37553763
(cherry picked from commit af4d4e9)
@jrose-apple jrose-apple force-pushed the 5.0-private-detective branch from cdc78bd to 5ac30ac Compare February 16, 2018 18:59
@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test

2 similar comments
@jrose-apple
Copy link
Contributor Author

jrose-apple commented Feb 16, 2018

@swift-ci Please smoke test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test

@jrose-apple
Copy link
Contributor Author

This is going to need #14683 too, so I'll wait until that goes in and then cherry-pick it as well.

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test

@jrose-apple jrose-apple merged commit 39221b9 into swiftlang:swift-5.0-branch Feb 17, 2018
@jrose-apple jrose-apple deleted the 5.0-private-detective branch February 17, 2018 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants