Skip to content

Conversation

@bcardosolopes
Copy link
Contributor

libdispatch has an umbrella header, dispatch.h, that should be used for
including all of the other headers. This is enforced via
DISPATCH_INDIRECT.

Since it isn't legal to include one of the other headers on their own,
it isn't logical to have submodules for them. Moreover, submodules
should have local visibility (be unaware of the context they're
included from); meaning that DISPATCH_INDIRECT will never be
defined.

Logically, all of the headers are part of a single module/interface.

Patch by me & Duncan P. Exon Smith

libdispatch has an umbrella header, dispatch.h, that should be used for
including all of the other headers.  This is enforced via
__DISPATCH_INDIRECT__.

Since it isn't legal to include one of the other headers on their own,
it isn't logical to have submodules for them.  Moreover, submodules
*should* have local visibility (be unaware of the context they're
included from); meaning that __DISPATCH_INDIRECT__ will never be
defined.

Logically, all of the headers are part of a single module/interface.

Patch by me & Duncan P. Exon Smith
@bcardosolopes
Copy link
Contributor Author

@swift-ci please test

@das das merged commit eea0667 into swiftlang:master Apr 11, 2017
das added a commit that referenced this pull request May 25, 2017
libdispatch: Avoid submodules for headers that should not be included

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
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