Skip to content

Parity: NSCoding: ByteCountFormatter, failWithError(_:) & ObjC API Notes compatibility. #2094

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
Apr 12, 2019
Merged

Parity: NSCoding: ByteCountFormatter, failWithError(_:) & ObjC API Notes compatibility. #2094

merged 1 commit into from
Apr 12, 2019

Conversation

millenomi
Copy link
Contributor

@millenomi millenomi commented Apr 12, 2019

Implementation of:

  • ByteCountFormatter’s NSCoding methods;

  • Tests, adding a macOS fixture;

  • Fixtures can now support types that do not support secure coding;

  • Re-enable failWithError(_:) to just log;

  • NSStringFromClass and NSClassFromString now have a mapping from swift-corelibs-foundation types to ObjC names, meaning that e.g. NSClassFromString("NSTask") will return SwiftFoundation.Process.self and NSStringFromClass(SwiftFoundation.Process.self) will return "NSTask". This is required for unarchiving formatters (since ByteCountFormatter is "NSByteCountFormatter", Formatter is "NSFormatter" in archives.)

Fixes https://bugs.swift.org/browse/SR-10455, https://bugs.swift.org/browse/SR-10351, https://bugs.swift.org/browse/SR-10415.

…tes compatibility.

Implementation of:
 - ByteCountFormatter’s NSCoding methods;
 - Tests, adding a macOS fixture;
 - Fixtures can now support types that do not support secure coding;
 - Re-enable failWithError(_:) to just log;
 - NSStringFromClass and NSClassFromString now have a mapping from swift-corelibs-foundation types to ObjC names, meaning that e.g. NSClassFromString(“NSTask”) will return SwiftFoundation.Process.self and NSStringFromClass(SwiftFoundation.Process.self) will return “NSTask”. This is required for unarchiving formatters (since ByteCountFormatter is “NSByteCountFormatter”, Formatter is “NSFormatter” in archives.)
@millenomi
Copy link
Contributor Author

@swift-ci please test

1 similar comment
@compnerd
Copy link
Member

@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.

2 participants