-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Import the Foundation overlay codebase from the Swift repository #2915
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… message on the condition
…ed mismatched container type
Protocols in resilient libraries that wish to provide a default implementation of hashing need to do so by providing a hash(into:) implementation. hashValue has been deprecated as a Hashable requirement in SE-0206. Implementing only it in a protocol extension curses conforming types to get deprecation warnings by default.
…alue/_rawHashValue The compiler-synthesized / stdlib-provided default implementations seem perfectly fine for these.
…ntation These implementations did not produce the same hash values as the raw value. RawRepresentable provides a correct hashing implementation by default, so let’s just use that.
DataProtocol and new inline Data
As seen in swift crashers while building swiftlang/swift#20103
…itly know that it is 64 bit; this allows for better portability (#21290)
Build crash fix: AnyObject -> NSDictionary
…t explicitly know that it is 64 bit; this allows for better portability (#21290)" This reverts commit c7be592.
…ility-in-tests Add #available checks for NSKeyedArchiver methods in tests
appendingPathComponent(:isDirectory:) should account for isDirectory
These special symbols instruct the linker to load these overlay dylibs from the rpath on OS versions that shipped before the Swift 5 release. Apps targeting these versions ship with a special build of the stdlib & overlays in their bundle.
This PR imports the Foundation overlay codebase from the Swift compiler repository up to commit 7f2185d3 on 2020-10-28. swiftlang/swift@7f2185d This includes the associated regression tests (ported to XCTest), and comes complete with a working Xcode project file to build the overlay. The intention is that the Foundation overlay will be maintained in this repository from now on; the original codebase will be removed from the Swift repo once we teach the compiler's build system to pick up the overlay from here. Note that while there is significant overlap between functionality, implementations and test cases between swift-corelibs-foundation and the Foundation overlay, this particular PR makes no effort to share code or run unified tests across the two projects. * * * To build the overlay, you currently need to point Xcode to a local build of the Swift compiler & stdlib by manually overriding the SWIFT_EXEC and SWIFT_LIBRARY_PATH build settings to the location of your custom Swift compiler executable and Swift standard library, respectively: env SWIFT_EXEC=.../build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swiftc \ SWIFT_LIBRARY_PATH=.../build/Ninja-ReleaseAssert/swift-macosx-x86_64/lib/swift/macosx \ xcodebuild (Replacing `macosx` with the platform you're targeting, as needed.) * * * This PR preserves the full commit history of the imported files, including attribution and commit messages. However, as this is a partial import, you cannot build the Foundation overlay from historical commits -- you'll need to use the Swift repository for that. The Swift repository's mailmap file as of the commit above was used to update/fix author names and email addresses.
All: we are moving things around so that Foundation sources are all together, for both Darwin and off-Darwin. |
cc @parkera |
@swift-ci please test |
@lorentey LGTM |
millenomi
approved these changes
Oct 31, 2020
Note: The bits that don't come verbatim from the Swift repository are isolated in the last dozen or so commits: |
@swift-ci please test |
@swift-ci test linux platform |
1 similar comment
@swift-ci test linux platform |
@swift-ci test linux |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR imports the Foundation overlay codebase from the Swift compiler repository up to commit 7f2185d3 on 2020-10-28.
This includes the associated regression tests (ported to XCTest), and comes complete with a working Xcode project file to build the overlay.
The intention is that the Foundation overlay will be maintained in this repository from now on; the original codebase will be removed from the Swift repo once we teach the compiler's build system to pick up the overlay from here.
Note that while there is significant overlap in the functionality, implementations and test cases between swift-corelibs-foundation and the Foundation overlay, this particular PR makes no effort to share code or run unified tests across the two projects.
To build the overlay, you currently need to point Xcode to a local build of the Swift compiler & stdlib by manually overriding the SWIFT_EXEC and SWIFT_LIBRARY_PATH build settings to the location of your custom Swift compiler executable and Swift standard library, respectively:
(Replacing
macosx
with the platform you're targeting, as needed.)This PR preserves the full commit history of the imported files, including attribution and commit messages. However, as this is a partial import, you cannot build the Foundation overlay from historical commits -- you'll need to use the Swift repository for
that.
The Swift repository's mailmap file as of the commit above was used to update/fix author names and email addresses.
Resolves rdar://70903483.