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

Remove dependency on swift-system #7138

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ endif()
add_compile_options(-DUSE_IMPL_ONLY_IMPORTS)

if(FIND_PM_DEPS)
find_package(SwiftSystem CONFIG REQUIRED)
find_package(TSC CONFIG REQUIRED)

find_package(LLBuild CONFIG)
Expand Down
10 changes: 1 addition & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,7 @@ Clone the following repositories beside the SwiftPM directory:
$> git clone https://github.com/apple/swift-driver
```

6. [swift-system] and check out tag with the [latest version](https://github.com/apple/swift-system/tags).

For example, if the latest tag is 1.0.0:
```sh
$> git clone https://github.com/apple/swift-system --branch 1.0.0
```

7. [swift-collections] and check out tag with the [latest version](https://github.com/apple/swift-collections/tags).
6. [swift-collections] and check out tag with the [latest version](https://github.com/apple/swift-collections/tags).

For example, if the latest tag is 1.0.1:
```sh
Expand Down Expand Up @@ -221,7 +214,6 @@ Clone the following repositories beside the SwiftPM directory:
[swift-collections]: https://github.com/apple/swift-collections
[swift-driver]: https://github.com/apple/swift-driver
[swift-llbuild]: https://github.com/apple/swift-llbuild
[swift-system]: https://github.com/apple/swift-system
[swift-tools-support-core]: https://github.com/apple/swift-tools-support-core
[swift-crypto]: https://github.com/apple/swift-crypto
[swift-asn1]: https://github.com/apple/swift-asn1
Expand Down
3 changes: 0 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ let package = Package(
.product(name: "DequeModule", package: "swift-collections"),
.product(name: "OrderedCollections", package: "swift-collections"),
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
.product(name: "SystemPackage", package: "swift-system"),
],
exclude: ["CMakeLists.txt", "Vendor/README.md"]
),
Expand Down Expand Up @@ -738,7 +737,6 @@ if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.2.2")),
.package(url: "https://github.com/apple/swift-driver.git", branch: relatedDependenciesBranch),
.package(url: "https://github.com/apple/swift-crypto.git", .upToNextMinor(from: "3.0.0")),
.package(url: "https://github.com/apple/swift-system.git", .upToNextMinor(from: "1.1.1")),
.package(url: "https://github.com/apple/swift-collections.git", .upToNextMinor(from: "1.0.1")),
.package(url: "https://github.com/apple/swift-certificates.git", .upToNextMinor(from: "1.0.1")),
]
Expand All @@ -748,7 +746,6 @@ if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
.package(path: "../swift-argument-parser"),
.package(path: "../swift-driver"),
.package(path: "../swift-crypto"),
.package(path: "../swift-system"),
.package(path: "../swift-collections"),
.package(path: "../swift-certificates"),
]
Expand Down
1 change: 0 additions & 1 deletion Sources/Basics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ add_library(Basics
target_link_libraries(Basics PUBLIC
SwiftCollections::DequeModule
SwiftCollections::OrderedCollections
SwiftSystem::SystemPackage
TSCBasic
TSCUtility)
target_link_libraries(Basics PRIVATE
Expand Down
1 change: 0 additions & 1 deletion Sources/Basics/FileSystem/FileSystem+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import struct Foundation.Data
import class Foundation.FileManager
import struct Foundation.UUID
import SystemPackage

import struct TSCBasic.ByteString
import struct TSCBasic.FileInfo
Expand Down
1 change: 0 additions & 1 deletion Utilities/Docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ services:
- ../../../swift-crypto:/code/swift-crypto:z
- ../../../swift-driver:/code/swift-driver:z
- ../../../swift-llbuild:/code/llbuild:z
- ../../../swift-system:/code/swift-system:z
- ../../../swift-collections:/code/swift-collections:z
- ../../../swift-asn1:/code/swift-asn1:z
- ../../../swift-certificates:/code/swift-certificates:z
Expand Down
11 changes: 1 addition & 10 deletions Utilities/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ def parse_global_args(args):
args.source_dirs["swift-argument-parser"] = os.path.join(args.project_root, "..", "swift-argument-parser")
args.source_dirs["swift-crypto"] = os.path.join(args.project_root, "..", "swift-crypto")
args.source_dirs["swift-driver"] = os.path.join(args.project_root, "..", "swift-driver")
args.source_dirs["swift-system"] = os.path.join(args.project_root, "..", "swift-system")
args.source_dirs["swift-collections"] = os.path.join(args.project_root, "..", "swift-collections")
args.source_dirs["swift-certificates"] = os.path.join(args.project_root, "..", "swift-certificates")
args.source_dirs["swift-asn1"] = os.path.join(args.project_root, "..", "swift-asn1")
Expand Down Expand Up @@ -320,19 +319,14 @@ def build(args):
if not "llbuild" in args.build_dirs:
build_llbuild(args)

# tsc depends on swift-system so they must be built first.
build_dependency(args, "swift-system")
# swift-driver depends on tsc, swift-argument-parser, and yams so they must be built first.
tsc_cmake_flags = [
"-DSwiftSystem_DIR=" + os.path.join(args.build_dirs["swift-system"], "cmake/modules"),
]
tsc_cmake_flags = []
build_dependency(args, "tsc", tsc_cmake_flags)
build_dependency(args, "swift-argument-parser", ["-DBUILD_TESTING=NO", "-DBUILD_EXAMPLES=NO"])
build_dependency(args, "yams", [], [get_foundation_cmake_arg(args)] if args.foundation_build_dir else [])

swift_driver_cmake_flags = [
get_llbuild_cmake_arg(args),
"-DSwiftSystem_DIR=" + os.path.join(args.build_dirs["swift-system"], "cmake/modules"),
"-DTSC_DIR=" + os.path.join(args.build_dirs["tsc"], "cmake/modules"),
"-DYams_DIR=" + os.path.join(args.build_dirs["yams"], "cmake/modules"),
"-DArgumentParser_DIR=" + os.path.join(args.build_dirs["swift-argument-parser"], "cmake/modules"),
Expand Down Expand Up @@ -589,7 +583,6 @@ def build_swiftpm_with_cmake(args):
"-DTSC_DIR=" + os.path.join(args.build_dirs["tsc"], "cmake/modules"),
"-DArgumentParser_DIR=" + os.path.join(args.build_dirs["swift-argument-parser"], "cmake/modules"),
"-DSwiftDriver_DIR=" + os.path.join(args.build_dirs["swift-driver"], "cmake/modules"),
"-DSwiftSystem_DIR=" + os.path.join(args.build_dirs["swift-system"], "cmake/modules"),
"-DSwiftCollections_DIR=" + os.path.join(args.build_dirs["swift-collections"], "cmake/modules"),
"-DSwiftCrypto_DIR=" + os.path.join(args.build_dirs["swift-crypto"], "cmake/modules"),
"-DSwiftASN1_DIR=" + os.path.join(args.build_dirs["swift-asn1"], "cmake/modules"),
Expand All @@ -610,7 +603,6 @@ def build_swiftpm_with_cmake(args):
add_rpath_for_cmake_build(args, os.path.join(args.build_dirs["swift-argument-parser"], "lib"))
add_rpath_for_cmake_build(args, os.path.join(args.build_dirs["swift-crypto"], "lib"))
add_rpath_for_cmake_build(args, os.path.join(args.build_dirs["swift-driver"], "lib"))
add_rpath_for_cmake_build(args, os.path.join(args.build_dirs["swift-system"], "lib"))
add_rpath_for_cmake_build(args, os.path.join(args.build_dirs["swift-collections"], "lib"))
add_rpath_for_cmake_build(args, os.path.join(args.build_dirs["swift-asn1"], "lib"))
add_rpath_for_cmake_build(args, os.path.join(args.build_dirs["swift-certificates"], "lib"))
Expand Down Expand Up @@ -744,7 +736,6 @@ def get_swiftpm_env_cmd(args):
os.path.join(args.build_dirs["swift-argument-parser"], "lib"),
os.path.join(args.build_dirs["swift-crypto"], "lib"),
os.path.join(args.build_dirs["swift-driver"], "lib"),
os.path.join(args.build_dirs["swift-system"], "lib"),
os.path.join(args.build_dirs["swift-collections"], "lib"),
os.path.join(args.build_dirs["swift-asn1"], "lib"),
os.path.join(args.build_dirs["swift-certificates"], "lib"),
Expand Down