From 0a9a2db28ff44a83c92c67e91413729b17b1deec Mon Sep 17 00:00:00 2001 From: Kyle Date: Tue, 26 Sep 2023 00:40:46 +0800 Subject: [PATCH] Remove dependency on argument-parser See https://github.com/apple/swift-markdown/pull/149 --- .gitignore | 2 +- Package.swift | 4 +- Package@swift-5.5.swift | 49 ------------------- Tools/Package.swift | 31 ++++++++++++ .../dump-unified-graph/DumpUnifiedGraph.swift | 0 5 files changed, 33 insertions(+), 53 deletions(-) delete mode 100644 Package@swift-5.5.swift create mode 100644 Tools/Package.swift rename {Sources => Tools}/dump-unified-graph/DumpUnifiedGraph.swift (100%) diff --git a/.gitignore b/.gitignore index 80a7ad8..433efe4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ # See https://swift.org/CONTRIBUTORS.txt for Swift project authors .DS_Store -/.build +.build /Packages /*.xcodeproj xcuserdata/ diff --git a/Package.swift b/Package.swift index 6d82c3b..8a31a2f 100644 --- a/Package.swift +++ b/Package.swift @@ -1,6 +1,4 @@ -// swift-tools-version:5.2 -// In order to support users running on the latest Xcodes, please ensure that -// Package@swift-5.5.swift is kept in sync with this file. +// swift-tools-version:5.5 /* This source file is part of the Swift.org open source project diff --git a/Package@swift-5.5.swift b/Package@swift-5.5.swift deleted file mode 100644 index dc56106..0000000 --- a/Package@swift-5.5.swift +++ /dev/null @@ -1,49 +0,0 @@ -// swift-tools-version:5.5 -/* - This source file is part of the Swift.org open source project - - Copyright (c) 2021-2022 Apple Inc. and the Swift project authors - Licensed under Apache License v2.0 with Runtime Library Exception - - See https://swift.org/LICENSE.txt for license information - See https://swift.org/CONTRIBUTORS.txt for Swift project authors -*/ - -import PackageDescription -import class Foundation.ProcessInfo - -let package = Package( - name: "SymbolKit", - products: [ - .library( - name: "SymbolKit", - targets: ["SymbolKit"]), - ], - targets: [ - .target( - name: "SymbolKit", - dependencies: []), - .testTarget( - name: "SymbolKitTests", - dependencies: ["SymbolKit"]), - ] -) - -// If the `SWIFTCI_USE_LOCAL_DEPS` environment variable is set, -// we're building in the Swift.org CI system alongside other projects in the Swift toolchain. -// In this case we only want to build the `dump-unified-graph` tool outside of Swift CI. -if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil { - // Building standalone, so fetch all dependencies remotely. - package.dependencies += [ - .package(url: "https://github.com/apple/swift-argument-parser", .upToNextMinor(from: "1.0.1")), - ] - - package.targets += [ - .executableTarget( - name: "dump-unified-graph", - dependencies: [ - "SymbolKit", - .product(name: "ArgumentParser", package: "swift-argument-parser"), - ]), - ] -} diff --git a/Tools/Package.swift b/Tools/Package.swift new file mode 100644 index 0000000..2b05b52 --- /dev/null +++ b/Tools/Package.swift @@ -0,0 +1,31 @@ +// swift-tools-version:5.5 +/* + This source file is part of the Swift.org open source project + Copyright (c) 2023 Apple Inc. and the Swift project authors + Licensed under Apache License v2.0 with Runtime Library Exception + See https://swift.org/LICENSE.txt for license information + See https://swift.org/CONTRIBUTORS.txt for Swift project authors +*/ + +import PackageDescription + +let package = Package( + name: "Tools", + products: [ + .executable(name: "dump-unified-graph", targets: ["dump-unified-graph"]), + ], + dependencies: [ + .package(name: "SymbolKit", path: "../."), + .package(url: "https://github.com/apple/swift-argument-parser", from: "1.2.2"), + ], + targets: [ + .executableTarget( + name: "dump-unified-graph", + dependencies: [ + .product(name: "SymbolKit", package: "SymbolKit"), + .product(name: "ArgumentParser", package: "swift-argument-parser") + ], + path: "dump-unified-graph" + ), + ] +) \ No newline at end of file diff --git a/Sources/dump-unified-graph/DumpUnifiedGraph.swift b/Tools/dump-unified-graph/DumpUnifiedGraph.swift similarity index 100% rename from Sources/dump-unified-graph/DumpUnifiedGraph.swift rename to Tools/dump-unified-graph/DumpUnifiedGraph.swift