-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[RFC] Sync NSStringAPI.swift from overlay #1167
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
Conversation
Go to https://www.diffchecker.com/ysVPYFqr to see the diff of |
As a general question, shouldnt all of the APIs in the Foundation SDK overlay be kept in sync with the corelibs-foundation ones (excepting macOS/iOS specific ones) or should we expect some differences? |
Yes they should be in sync. Complications arise because the overlay is missing some public API (because part of the Darwin implementation is closed source Objective-C), and also has extra API that's deliberately not in |
0518c8d
to
3dc0a37
Compare
3dc0a37
to
ff2e2ca
Compare
Rebased and fixed merge conflicts. |
Can you ifdef the deletions/changes from the overlay? That way we can copy/paste back and forth |
Yes. What should the |
Probably DEPLOYMENT_RUNTIME_SWIFT is appropriate in most if not all of the cases. We want the Xcode build of swift-corelibs-foundation to behave as close to the linux one as possible. Also we want the Darwin overlay to share the same code; any differential should be a objc differential. So it might even be good to remove |
Sounds good. Do you know what that compiler runtime call is? Or where I should look to find it? |
|
OK I'll have a crack and see how I get on. Thanks. |
Closing in favour of #1178 |
Over time,
NSStringAPI.swift
has diverged from the version in the overlay.This PR brings them back into sync, by copying the overlay version into
swift-corelibs-foundation
, then fixing the resulting breakages so it builds and passes TestFoundation on Linux and in Xcode.Hopefully this will make it easier to port changes between the two in future.
Comments please - is this worth doing and have I made a mess of it? 🙂