diff --git a/.gitignore b/.gitignore index 80a7ad8..45eaedf 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ SymbolGraph.symbols.json .swiftpm Package.resolved .vscode +/Tools/.build 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