Skip to content

Move NotificationCenter to swift-foundation #5246

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cthielen
Copy link

This PR moves NotificationCenter into swift-foundation.

  • NotificationCenter is now defined in swift-foundation, with some methods kept in swift-corelibs-foundation via extension. This has the result of removing the ability to override these methods, e.g. addObserver(forName:object:queue:block) cannot be open in an extension.
  • NotificationCenter no longer conforms to NSObject in swift-corelibs-foundation due to the lack of NSObject in swift-foundation, where NotificationCenter is now defined, and the inability to add that inheritance retroactively in swift-corelibs-foundation.
  • Core logic for NotificationCenter was moved to swift-foundation and is accessed via @_spi(SwiftCorelibsFoundation) public methods. This enables methods like addObserver(forName:object:queue:block) to remain in swift-corelibs-foundation.

@cthielen
Copy link
Author

@swift-ci please test

@cthielen
Copy link
Author

swiftlang/swift-foundation#1452

@swift-ci please test

1 similar comment
@cthielen
Copy link
Author

swiftlang/swift-foundation#1452

@swift-ci please test

@cthielen
Copy link
Author

@swift-ci please test

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.

1 participant