Skip to content

[swift] Stop using _SwiftDispatchOverlayShims #592

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
merged 1 commit into from
Feb 8, 2022

Conversation

lorentey
Copy link
Member

@lorentey lorentey commented Feb 8, 2022

Stop importing _SwiftDispatchOverlayShims from the Swift stdlib; instead, copy its contents to a new private _DispatchOverlayShims module, and import it with the @_implementationOnly attribute so that clients no longer need to have access to it to merely import Dispatch.

The Swift stdlib currently ships the _SwiftDispatchOverlayShims module, but we don't want to keep it there -- it consists of declarations that belong to the dispatch project, and it is best maintained by the same people who maintain the library itself.

The Dispatch overlay on Darwin has not been importing this module for a couple years now.

Stop importing _SwiftDispatchOverlayShims from the Swift stdlib; instead, copy its contents to a new private _DispatchOverlayShims module, and import it with the @_implementationOnly attribute so that clients no longer need to have access to it to merely import Dispatch.

The Swift stdlib currently ships the _SwiftDispatchOverlayShims module, but we don't want to keep it there -- it declares APIs that belong to the dispatch project, and it is best maintained by the same people who maintain the library itself.

The Dispatch overlay on Darwin has not been importing this module for a couple years now.
@lorentey lorentey requested review from Azoy and rokhinip February 8, 2022 02:42
@lorentey
Copy link
Member Author

lorentey commented Feb 8, 2022

@swift-ci test

Copy link

@Azoy Azoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@lorentey lorentey merged commit 87ba473 into main Feb 8, 2022
@lorentey lorentey deleted the lorentey/stop-using-toolchain-shims branch February 8, 2022 19:30
lorentey added a commit to lorentey/swift that referenced this pull request Feb 8, 2022
This module used to be a private implementation detail of the Distpatch overlay on Apple platforms, and swift-corelibs-libdispatch elsewhere.

Darwin hasn't been using this module for a couple years now, and swift-corelibs-dispatch stopped using it with swiftlang/swift-corelibs-libdispatch#592. We are now free to remove it from the Swift toolchain -- which is good, as it contains declarations that are specific to Dispatch, and the compiler/stdlib is not the right place to maintain them.
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.

3 participants