Skip to content

partially restructure the source tree #2645

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 13 commits into from
Feb 16, 2020

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Feb 4, 2020

Restructure the Foundation modules into subdirectories for ease of discoverability. This restructures the tree into the standard Apple framework-like layout with a subdirectory for each Swift "framework" module.

@compnerd
Copy link
Member Author

compnerd commented Feb 4, 2020

@swift-ci please test

@compnerd compnerd force-pushed the the-great-restructuring branch from 9f5d3cc to 47cec07 Compare February 4, 2020 02:23
@compnerd
Copy link
Member Author

compnerd commented Feb 4, 2020

@swift-ci please test

@compnerd compnerd force-pushed the the-great-restructuring branch from 47cec07 to e797251 Compare February 4, 2020 03:16
@compnerd
Copy link
Member Author

compnerd commented Feb 4, 2020

@swift-ci please test

@compnerd compnerd force-pushed the the-great-restructuring branch from e797251 to ea2f797 Compare February 4, 2020 05:02
@compnerd
Copy link
Member Author

compnerd commented Feb 4, 2020

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Feb 4, 2020

Test with following PRs:
swiftlang/swift#29634

@swift-ci please test Linux platform

@spevans
Copy link
Contributor

spevans commented Feb 4, 2020

Looks like there is a duplicate copy of Boxing.swift in ./Sources/FoundationNetworking/URLSession/Boxing.swift even though the ./Sources/FoundationNetworking/CMakeLists.txt refers to the one in ../Foundation/Boxing.swift

@compnerd compnerd force-pushed the the-great-restructuring branch from ea2f797 to b18ff27 Compare February 4, 2020 16:38
@compnerd
Copy link
Member Author

compnerd commented Feb 4, 2020

@spevans removed the duplicate copy, thanks for pointing that out

@compnerd
Copy link
Member Author

compnerd commented Feb 4, 2020

@swift-ci please test Linux platform

@compnerd compnerd force-pushed the the-great-restructuring branch from b18ff27 to bbad51b Compare February 4, 2020 22:13
@compnerd
Copy link
Member Author

compnerd commented Feb 4, 2020

@swift-ci please test

1 similar comment
@compnerd
Copy link
Member Author

compnerd commented Feb 4, 2020

@swift-ci please test

@compnerd compnerd force-pushed the the-great-restructuring branch from bbad51b to dd95c6d Compare February 10, 2020 02:39
@compnerd
Copy link
Member Author

@swift-ci please test Linux platform

@compnerd compnerd force-pushed the the-great-restructuring branch from 0c5c553 to 92bb601 Compare February 10, 2020 04:37
@compnerd
Copy link
Member Author

@swift-ci please test

@spevans
Copy link
Contributor

spevans commented Feb 10, 2020

What is the benefit of moving all of the files around? Doesnt it now require knowledge of which subdirectory a file is in? Im not sure this actually helps in anyway.

@compnerd
Copy link
Member Author

@spevans it actually helps quite a bit with discoverability. It also makes it easier to grep within a single target (e.g. FoundationNetworking vs FoundationXML).

@compnerd
Copy link
Member Author

@swift-ci please test

1 similar comment
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd compnerd force-pushed the the-great-restructuring branch from 92bb601 to 47875a1 Compare February 13, 2020 03:43
@compnerd
Copy link
Member Author

Please test with following PRs:
swiftlang/swift#29804

@swift-ci please test Linux platform

@compnerd compnerd force-pushed the the-great-restructuring branch from 47875a1 to f84a465 Compare February 13, 2020 06:10
@compnerd
Copy link
Member Author

Please test with following PRs:
swiftlang/swift#29804

@swift-ci please test Linux platform

@compnerd compnerd force-pushed the the-great-restructuring branch from f84a465 to 6b3d55c Compare February 14, 2020 16:16
@compnerd
Copy link
Member Author

@swift-ci please test Linux platform

@compnerd compnerd force-pushed the the-great-restructuring branch from 6b3d55c to ce641b9 Compare February 15, 2020 08:02
@compnerd
Copy link
Member Author

@swift-ci please test Linux platform

@compnerd compnerd force-pushed the the-great-restructuring branch from ce641b9 to 45c9634 Compare February 15, 2020 18:04
@compnerd
Copy link
Member Author

@swift-ci please test Linux platform

@compnerd compnerd force-pushed the the-great-restructuring branch from 45c9634 to 03bafae Compare February 15, 2020 21:08
@compnerd
Copy link
Member Author

Please test with following PRs:
swiftlang/swift-corelibs-xctest#298

@swift-ci please test Linux platform

This adds the `@testable import` of `Foundation` since
`_ProgressFraction` is private.  This seems to have been missed in the
conversion, but restructuring the tree has identified this difference.
This moves the `TestFoundation` directory to a `Tests` directory to home
all the testing infrastructure.  The Foundation tests are now present
under `Tests/Foundation`.  The Test cases themselves are in the `Tests`
directory under `Tests/Foundation` and the supporting files in the
directory itself.

`xdgTestHelper` has been moved into `Tests/Tools/XDGTestHelper`.

This restructure allows for the emission of the `TestFoundation` binary
in the top level directory for the build output.  This is required to
co-locate the libraries and the executables which is needed for Windows.
This moves the UUID library into the `Sources` directory as part of a
restructuring of the source tree.
Move the local copy of the BlocksRuntime into the sources tree.
This splits out the `FoundationXML` sources from `Foundation` into
`Sources/FoundationXML`.  This makes it easier to identify the target
that the sources are associated with and to grep for something in a
particular target.

Restructure the build to follow best practices for CMake and split out
the monolithic CMakeLists.txt into a target specific one.
This moves the resources for the FoundationNetworking target into
`Sources` into their own subdirectory.  This sorts the sources for the
target from the rest of the Foundation trget after the split into
sub-modules.
This moves the Foundation sources from `Foundation` into a subdirectory
in `Sources`.  This reflects the traditional directory structure for
Frameworks.
This moves the `plutil` tool into the `Sources` directory.
…ures`

Move the `GenerateTestFixtures` tool into the tests subdirectory.
Remove the GenerateTestFixtures project as that has been added as a
scheme in the Foundation project.  Add schemes for all of the products
in the project.  Update for the new tree structure.
Use more modern property setting for the RPATH rather than spreading the
workaround throughout the build.  Centralise the Swift module directory
handling.
The Foundation module is a public link target as that is re-exposed to
users of FoundationNetwork and FoundationXML.  Explicitly make the link
to Foundation `PUBLIC`.
It seems that `RPATH` is not properly handled by CMake on executables.
Restore the old workaround for the time being.
@compnerd compnerd force-pushed the the-great-restructuring branch from 03bafae to 3ea08fe Compare February 15, 2020 23:06
@compnerd
Copy link
Member Author

Please test with following PRs:
swiftlang/swift-corelibs-xctest#298

@swift-ci please test Linux platform

@compnerd compnerd merged commit 2a5bc4d into swiftlang:master Feb 16, 2020
@compnerd compnerd deleted the the-great-restructuring branch February 16, 2020 18:55
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