Skip to content
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

Create infrastructure to separate Foundation into multiple modules; move all code into FoundationBase module. #1799

Closed
wants to merge 5 commits into from

Conversation

millenomi
Copy link
Contributor

This commit moves all of {Swift,}Foundation into a separate module named {Swift,}FoundationSoil, including the Core Foundation symbols, and then creates a new {Swift,}Foundation module that re-exports Soil so that import {Swift,}Foundation clients can continue working correctly. The module name isn’t final; do not use it.

Future split work can define multiple modules this way by copying the approach in both the Xcode project and the CMake setup.

This requires a coordinated clang change (forthcoming).

@millenomi
Copy link
Contributor Author

Please test with the following:
apple/swift-clang#245

@swift-ci please test

@millenomi
Copy link
Contributor Author

cc @gottesmm @compnerd

@millenomi
Copy link
Contributor Author

Please test with the following:
apple/swift-clang#245
swiftlang/swift-package-manager#1914

@swift-ci please test


import CoreFoundation

#if DEPLOYMENT_RUNTIME_SWIFT && canImport(Darwin)
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this due to the ObjC Foundation existing and not specific to Darwin? Can we not do something like @_runtime(_ObjC) here? :-(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I’ve tried really hard to confine private attributes elsewhere, but it is correct that the one you point is the most relevant condition.

@millenomi
Copy link
Contributor Author

Please test with the following:
apple/swift-clang#245
swiftlang/swift-package-manager#1914
swiftlang/swift#21234

@swift-ci please test

3 similar comments
@millenomi
Copy link
Contributor Author

Please test with the following:
apple/swift-clang#245
swiftlang/swift-package-manager#1914
swiftlang/swift#21234

@swift-ci please test

@millenomi
Copy link
Contributor Author

Please test with the following:
apple/swift-clang#245
swiftlang/swift-package-manager#1914
swiftlang/swift#21234

@swift-ci please test

@millenomi
Copy link
Contributor Author

Please test with the following:
apple/swift-clang#245
swiftlang/swift-package-manager#1914
swiftlang/swift#21234

@swift-ci please test

millenomi added a commit to millenomi/swift-clang that referenced this pull request Jan 2, 2019
@millenomi
Copy link
Contributor Author

Please test with the following:
apple/swift-clang#245
swiftlang/swift-package-manager#1914
swiftlang/swift#21234

@swift-ci please test

1 similar comment
@millenomi
Copy link
Contributor Author

Please test with the following:
apple/swift-clang#245
swiftlang/swift-package-manager#1914
swiftlang/swift#21234

@swift-ci please test

@millenomi
Copy link
Contributor Author

Unsure why the clang patch isn't being picked up.

@millenomi
Copy link
Contributor Author

Please test with the following:
apple/swift-clang#245
swiftlang/swift-package-manager#1914
swiftlang/swift#21234

@swift-ci please test

@millenomi
Copy link
Contributor Author

The macOS crash is suspect, but unclear if patch-related.

millenomi added a commit to millenomi/swift-clang that referenced this pull request Jan 3, 2019
@millenomi
Copy link
Contributor Author

Rebased onto master to ensure this isn't hitting a since-fixed bug.

@millenomi
Copy link
Contributor Author

Please test with the following:
apple/swift-clang#245
swiftlang/swift-package-manager#1914
swiftlang/swift#21234

@swift-ci please test

@millenomi
Copy link
Contributor Author

I don't see this crash without my patch; building on macOS to check.

@millenomi
Copy link
Contributor Author

Please test with the following:
apple/swift-clang#245
swiftlang/swift-package-manager#1914
swiftlang/swift#21234

@swift-ci please test

@millenomi millenomi changed the title Prepare splitting swift-corelibs-foundation into multiple modules. Create infrastructure to separate Foundation into multiple modules; move all code into FoundationBase module. Jan 8, 2019
This commit moves all of {Swift,}Foundation into a separate module named {Swift,}FoundationSoil, including the Core Foundation symbols, and then creates a new {Swift,}Foundation module that re-exports Soil so that `import {Swift,}Foundation` clients can continue working correctly. **The module name isn’t final; do not use it.**

Future split work can define multiple modules this way by copying the approach in both the Xcode project and the CMake setup.

This requires a coordinated clang change.
@shahmishal shahmishal closed this Oct 6, 2020
@shahmishal
Copy link
Member

The Swift project moved the default branch to main and deleted master branch, so GitHub automatically closed the PR. Please re-create pull request with main branch.

More detail about the branch update - https://forums.swift.org/t/updating-branch-names/40412

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