Skip to content

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

Closed
millenomi wants to merge 5 commits into
swiftlang:masterfrom
millenomi:split-soil
Closed

Create infrastructure to separate Foundation into multiple modules; move all code into FoundationBase module.#1799
millenomi wants to merge 5 commits into
swiftlang:masterfrom
millenomi:split-soil

Conversation

@millenomi

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@swift-ci please test

@millenomi

Copy link
Copy Markdown
Contributor Author

cc @gottesmm @compnerd

@millenomi

Copy link
Copy Markdown
Contributor Author

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

@swift-ci please test

Comment thread Foundation/Foundation.swift Outdated

import CoreFoundation

#if DEPLOYMENT_RUNTIME_SWIFT && canImport(Darwin)

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@millenomi

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@millenomi

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@millenomi

Copy link
Copy Markdown
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
Copy Markdown
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