Skip to content

Clean up non-core commands #5917

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 1 commit into from
Dec 1, 2022
Merged
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 @@ -52,7 +52,6 @@ if(FIND_PM_DEPS)
endif()

find_package(ArgumentParser CONFIG REQUIRED)
find_package(SwiftCrypto CONFIG REQUIRED)
find_package(SwiftDriver CONFIG REQUIRED)
find_package(SwiftCollections CONFIG REQUIRED)
endif()
Expand Down
12 changes: 2 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,29 +183,21 @@ Clone the following repositories beside the SwiftPM directory:
$> git clone https://github.com/apple/swift-driver
```

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

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

7. [swift-system] and check out tag with the [latest version](https://github.com/apple/swift-system/tags).
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
```

8. [swift-collections] and check out tag with the [latest version](https://github.com/apple/swift-collections/tags).
7. [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
$> git clone https://github.com/apple/swift-collections --branch 1.0.1
[swift-argument-parser]: https://github.com/apple/swift-argument-parser
[swift-collections]: https://github.com/apple/swift-collections
[swift-crypto]: https://github.com/apple/swift-crypto
[swift-driver]: https://github.com/apple/swift-driver
[swift-llbuild]: https://github.com/apple/swift-llbuild
[swift-system]: https://github.com/apple/swift-system
Expand Down
52 changes: 40 additions & 12 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ packageCollectionsSigningTargets.append(
dependencies: [
.product(name: "Crypto", package: "swift-crypto"), // for CCryptoBoringSSL
],
exclude: ["CMakeLists.txt"],
cSettings: [
.define("WIN32_LEAN_AND_MEAN"),
]
Expand All @@ -90,7 +89,6 @@ packageCollectionsSigningTargets.append(
/** Package collections signing */
name: "PackageCollectionsSigning",
dependencies: packageCollectionsSigningDeps,
exclude: ["CMakeLists.txt"],
swiftSettings: swiftSettings
)
)
Expand Down Expand Up @@ -260,7 +258,6 @@ let package = Package(
name: "PackageCollectionsModel",
dependencies: [],
exclude: [
"CMakeLists.txt",
"Formats/v1.md"
]
),
Expand All @@ -274,8 +271,7 @@ let package = Package(
"PackageCollectionsSigning",
"PackageModel",
"SourceControl",
],
exclude: ["CMakeLists.txt"]
]
),

.target(
Expand Down Expand Up @@ -365,15 +361,45 @@ let package = Package(
"Basics",
"Build",
"CoreCommands",
"PackageCollections",
"PackageFingerprint",
"PackageGraph",
"SourceControl",
"Workspace",
"XCBuildSupport",
],
exclude: ["CMakeLists.txt", "README.md"]
),

.target(
/** Interacts with package collections */
name: "PackageCollectionsTool",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
"Basics",
"Commands",
"CoreCommands",
"PackageCollections",
"PackageModel",
]
),

.target(
/** Interact with package registry */
name: "PackageRegistryTool",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
"Basics",
"Commands",
"CoreCommands",
"PackageGraph",
"PackageLoading",
"PackageModel",
"PackageRegistry",
"SourceControl",
"SPMBuildCore",
"Workspace",
]
),

.executableTarget(
/** The main executable provided by SwiftPM */
name: "swift-package",
Expand Down Expand Up @@ -407,20 +433,22 @@ let package = Package(
.executableTarget(
/** Interacts with package collections */
name: "swift-package-collection",
dependencies: ["Commands"],
exclude: ["CMakeLists.txt"]
dependencies: ["Commands", "PackageCollectionsTool"]
),
.executableTarget(
/** Multi-tool entry point for SwiftPM. */
name: "swift-package-manager",
dependencies: ["Commands", "Basics", "PackageCollectionsTool", "PackageRegistryTool"]
),
.executableTarget(
/** Interact with package registry */
name: "swift-package-registry",
dependencies: ["Commands"],
exclude: ["CMakeLists.txt"]
dependencies: ["Commands", "PackageRegistryTool"]
),
.executableTarget(
/** Shim tool to find test names on OS X */
name: "swiftpm-xctest-helper",
dependencies: [],
exclude: ["CMakeLists.txt"],
linkerSettings: [
.unsafeFlags(["-Xlinker", "-rpath", "-Xlinker", "@executable_path/../../../lib/swift/macosx"], .when(platforms: [.macOS])),
]),
Expand Down
4 changes: 0 additions & 4 deletions Sources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ add_subdirectory(Commands)
add_subdirectory(CoreCommands)
add_subdirectory(DriverSupport)
add_subdirectory(LLBuildManifest)
add_subdirectory(PackageCollections)
add_subdirectory(PackageCollectionsModel)
add_subdirectory(PackageCollectionsSigning)
add_subdirectory(PackageCollectionsSigningLibc)
add_subdirectory(PackageDescription)
add_subdirectory(PackageFingerprint)
add_subdirectory(PackageGraph)
Expand Down
4 changes: 0 additions & 4 deletions Sources/Commands/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ add_library(Commands
PackageTools/ResetCommands.swift
PackageTools/Resolve.swift
PackageTools/ShowDependencies.swift
PackageTools/SwiftPackageCollectionsTool.swift
PackageTools/SwiftPackageRegistryTool.swift
PackageTools/SwiftPackageTool.swift
PackageTools/ToolsVersionCommand.swift
PackageTools/Update.swift
Expand Down Expand Up @@ -52,8 +50,6 @@ target_link_libraries(Commands PUBLIC
Basics
Build
CoreCommands
PackageCollections
PackageFingerprint
PackageGraph
SourceControl
TSCBasic
Expand Down
4 changes: 2 additions & 2 deletions Sources/Commands/SwiftBuildTool.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ public struct SwiftBuildTool: SwiftCommand {
public init() {}
}

extension SwiftCommand {
public func buildSystemProvider(_ swiftTool: SwiftTool) throws -> BuildSystemProvider {
public extension SwiftCommand {
func buildSystemProvider(_ swiftTool: SwiftTool) throws -> BuildSystemProvider {
return try swiftTool.defaultBuildSystemProvider
}
}
7 changes: 3 additions & 4 deletions Sources/Commands/ToolWorkspaceDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
//===----------------------------------------------------------------------===//

import Basics
import Build
import CoreCommands
import Dispatch
import class Foundation.NSLock
Expand Down Expand Up @@ -181,14 +180,14 @@ class ToolWorkspaceDelegate: WorkspaceDelegate {
func didDownloadAllBinaryArtifacts() {}
}

extension SwiftCommand {
public var workspaceDelegateProvider: WorkspaceDelegateProvider {
public extension SwiftCommand {
var workspaceDelegateProvider: WorkspaceDelegateProvider {
return {
ToolWorkspaceDelegate(observabilityScope: $0, outputHandler: $1, progressHandler: $2)
}
}

public var workspaceLoaderProvider: WorkspaceLoaderProvider {
var workspaceLoaderProvider: WorkspaceLoaderProvider {
return {
XcodeWorkspaceLoader(fileSystem: $0, observabilityScope: $1)
}
Expand Down
49 changes: 0 additions & 49 deletions Sources/PackageCollections/CMakeLists.txt

This file was deleted.

18 changes: 0 additions & 18 deletions Sources/PackageCollectionsModel/CMakeLists.txt

This file was deleted.

53 changes: 0 additions & 53 deletions Sources/PackageCollectionsSigning/CMakeLists.txt

This file was deleted.

27 changes: 0 additions & 27 deletions Sources/PackageCollectionsSigningLibc/CMakeLists.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import ArgumentParser
import Basics
import Commands
import CoreCommands
import Foundation
import PackageCollections
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import ArgumentParser
import Basics
import Commands
import CoreCommands
import TSCBasic
import SPMBuildCore
Expand Down
Loading