Skip to content

Commit 79f527d

Browse files
committed
Rename Utility to SPMUtility
The former is very likely to conflict with targets in other packages, preventing users from importing them in conjunction with SwiftPM.
1 parent 4e3804f commit 79f527d

File tree

116 files changed

+380
-380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+380
-380
lines changed

Package.swift

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ let package = Package(
2727
"SPMLibc",
2828
"POSIX",
2929
"Basic",
30-
"Utility",
30+
"SPMUtility",
3131
"SourceControl",
3232
"SPMLLBuild",
3333
"PackageModel",
@@ -45,7 +45,7 @@ let package = Package(
4545
"SPMLibc",
4646
"POSIX",
4747
"Basic",
48-
"Utility",
48+
"SPMUtility",
4949
"SourceControl",
5050
"SPMLLBuild",
5151
"PackageModel",
@@ -63,13 +63,13 @@ let package = Package(
6363
// APIs are implementation details of the package manager. Depend on it
6464
// at your own risk.
6565
.library(
66-
name: "Utility",
66+
name: "SPMUtility",
6767
targets: [
6868
"clibc",
6969
"SPMLibc",
7070
"POSIX",
7171
"Basic",
72-
"Utility",
72+
"SPMUtility",
7373
]
7474
),
7575
],
@@ -101,34 +101,34 @@ let package = Package(
101101
dependencies: ["SPMLibc", "POSIX"]),
102102
.target(
103103
/** Abstractions for common operations, should migrate to Basic */
104-
name: "Utility",
104+
name: "SPMUtility",
105105
dependencies: ["POSIX", "Basic"]),
106106
.target(
107107
/** Source control operations */
108108
name: "SourceControl",
109-
dependencies: ["Basic", "Utility"]),
109+
dependencies: ["Basic", "SPMUtility"]),
110110
.target(
111111
/** Shim for llbuild library */
112112
name: "SPMLLBuild",
113-
dependencies: ["Basic", "Utility"]),
113+
dependencies: ["Basic", "SPMUtility"]),
114114

115115
// MARK: Project Model
116116

117117
.target(
118118
/** Primitive Package model objects */
119119
name: "PackageModel",
120-
dependencies: ["Basic", "Utility"]),
120+
dependencies: ["Basic", "SPMUtility"]),
121121
.target(
122122
/** Package model conventions and loading support */
123123
name: "PackageLoading",
124-
dependencies: ["Basic", "PackageModel", "Utility", "SPMLLBuild"]),
124+
dependencies: ["Basic", "PackageModel", "SPMUtility", "SPMLLBuild"]),
125125

126126
// MARK: Package Dependency Resolution
127127

128128
.target(
129129
/** Data structures and support for complete package graphs */
130130
name: "PackageGraph",
131-
dependencies: ["Basic", "PackageLoading", "PackageModel", "SourceControl", "Utility"]),
131+
dependencies: ["Basic", "PackageLoading", "PackageModel", "SourceControl", "SPMUtility"]),
132132

133133
// MARK: Package Manager Functionality
134134

@@ -150,7 +150,7 @@ let package = Package(
150150
.target(
151151
/** High-level commands */
152152
name: "Commands",
153-
dependencies: ["Basic", "Build", "PackageGraph", "SourceControl", "Utility", "Xcodeproj", "Workspace"]),
153+
dependencies: ["Basic", "Build", "PackageGraph", "SourceControl", "SPMUtility", "Xcodeproj", "Workspace"]),
154154
.target(
155155
/** The main executable provided by SwiftPM */
156156
name: "swift-package",
@@ -177,11 +177,11 @@ let package = Package(
177177
.target(
178178
/** Test support library */
179179
name: "TestSupport",
180-
dependencies: ["Basic", "POSIX", "PackageGraph", "PackageLoading", "SourceControl", "Utility", "Commands"]),
180+
dependencies: ["Basic", "POSIX", "PackageGraph", "PackageLoading", "SourceControl", "SPMUtility", "Commands"]),
181181
.target(
182182
/** Test support executable */
183183
name: "TestSupportExecutable",
184-
dependencies: ["Basic", "POSIX", "Utility"]),
184+
dependencies: ["Basic", "POSIX", "SPMUtility"]),
185185

186186
.testTarget(
187187
name: "BasicTests",
@@ -200,7 +200,7 @@ let package = Package(
200200
dependencies: ["Workspace", "TestSupport"]),
201201
.testTarget(
202202
name: "FunctionalTests",
203-
dependencies: ["swift-build", "swift-package", "swift-test", "Basic", "Utility", "PackageModel", "TestSupport"]),
203+
dependencies: ["swift-build", "swift-package", "swift-test", "Basic", "SPMUtility", "PackageModel", "TestSupport"]),
204204
.testTarget(
205205
name: "FunctionalPerformanceTests",
206206
dependencies: ["swift-build", "swift-package", "swift-test", "TestSupport"]),
@@ -234,7 +234,7 @@ let package = Package(
234234
dependencies: ["TestSupport"]),
235235
.testTarget(
236236
name: "UtilityTests",
237-
dependencies: ["Utility", "TestSupport", "TestSupportExecutable"]),
237+
dependencies: ["SPMUtility", "TestSupport", "TestSupportExecutable"]),
238238
.testTarget(
239239
name: "XcodeprojTests",
240240
dependencies: ["Xcodeproj", "TestSupport"]),

Sources/Build/BuildDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010

1111
import Basic
12-
import Utility
12+
import SPMUtility
1313
import SPMLLBuild
1414
import Dispatch
1515

Sources/Build/BuildPlan.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010

1111
import Basic
12-
import Utility
12+
import SPMUtility
1313
import PackageModel
1414
import PackageGraph
1515
import PackageLoading
@@ -144,11 +144,11 @@ public struct BuildParameters {
144144
}
145145
return TerminalController.isTTY(stream)
146146
}()
147-
147+
148148
public var regenerateManifestToken: AbsolutePath {
149149
return dataPath.appending(components: "..", "regenerate-token")
150150
}
151-
151+
152152
public var llbuildManifest: AbsolutePath {
153153
return dataPath.appending(components: "..", configuration.dirname + ".yaml")
154154
}
@@ -188,7 +188,7 @@ public struct BuildParameters {
188188
case .off:
189189
addIndexStoreArguments = false
190190
case .auto:
191-
addIndexStoreArguments = configuration == .debug
191+
addIndexStoreArguments = configuration == .debug
192192
}
193193

194194
if addIndexStoreArguments {
@@ -325,7 +325,7 @@ public final class ClangTargetBuildDescription {
325325
// Enable index store, if appropriate.
326326
//
327327
// This feature is not widely available in OSS clang. So, we only enable
328-
// index store for Apple's clang or if explicitly asked to.
328+
// index store for Apple's clang or if explicitly asked to.
329329
if Process.env.keys.contains("SWIFTPM_ENABLE_CLANG_INDEX_STORE") {
330330
args += buildParameters.indexStoreArguments
331331
} else if buildParameters.triple.isDarwin(), (try? buildParameters.toolchain._isClangCompilerVendorApple()) == true {
@@ -719,7 +719,7 @@ public final class ProductBuildDescription {
719719
}
720720
args += ["-emit-executable"]
721721
}
722-
722+
723723
// On linux, set rpath such that dynamic libraries are looked up
724724
// adjacent to the product. This happens by default on macOS.
725725
if buildParameters.triple.isLinux() {
@@ -902,7 +902,7 @@ public class BuildPlan {
902902
for buildProduct in buildProducts {
903903
try plan(buildProduct)
904904
}
905-
// FIXME: We need to find out if any product has a target on which it depends
905+
// FIXME: We need to find out if any product has a target on which it depends
906906
// both static and dynamically and then issue a suitable diagnostic or auto
907907
// handle that situation.
908908
}
@@ -979,7 +979,7 @@ public class BuildPlan {
979979
switch dependency {
980980
case .target(let target):
981981
switch target.type {
982-
// Include executable and tests only if they're top level contents
982+
// Include executable and tests only if they're top level contents
983983
// of the product. Otherwise they are just build time dependency.
984984
case .executable, .test:
985985
if product.targets.contains(target) {

Sources/Build/Sanitizers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010

1111
import Basic
12-
import Utility
12+
import SPMUtility
1313

1414
/// Available runtime sanitizers.
1515
public enum Sanitizer: String {

Sources/Build/ToolProtocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import Basic
1212
import PackageModel
13-
import Utility
13+
import SPMUtility
1414
import class Foundation.ProcessInfo
1515

1616
/// Describes a tool which can be understood by llbuild's BuildSystem library.

Sources/Build/llbuild.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010

1111
import Basic
12-
import Utility
12+
import SPMUtility
1313
import PackageModel
1414
import PackageGraph
1515

Sources/Commands/Completions+bash.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import Foundation
1212
import Basic
13-
import Utility
13+
import SPMUtility
1414

1515
let listDependenciesCommand = "swift package \(PackageMode.completionTool.rawValue) \(PackageToolOptions.CompletionToolMode.listDependencies.rawValue)"
1616
let listExecutablesCommand = "swift package \(PackageMode.completionTool.rawValue) \(PackageToolOptions.CompletionToolMode.listExecutables.rawValue)"

Sources/Commands/Completions+zsh.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import Foundation
1212
import Basic
13-
import Utility
13+
import SPMUtility
1414

1515
/// Template for ZSH completion script.
1616
///

Sources/Commands/Error.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Basic
1212
import PackageLoading
1313
import PackageModel
1414
import SourceControl
15-
import Utility
15+
import SPMUtility
1616
import func POSIX.exit
1717
import Workspace
1818

Sources/Commands/Options.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
*/
1010

1111
import Basic
12-
import Utility
12+
import SPMUtility
1313
import Build
1414
import PackageModel
1515

1616
public class ToolOptions {
1717
/// Custom arguments to pass to C compiler, swift compiler and the linker.
1818
public var buildFlags = BuildFlags()
19-
19+
2020
/// Build configuration.
2121
public var configuration: BuildConfiguration = .debug
2222

@@ -25,7 +25,7 @@ public class ToolOptions {
2525

2626
/// The custom working directory that the tool should operate in (deprecated).
2727
public var chdir: AbsolutePath?
28-
28+
2929
/// The custom working directory that the tool should operate in.
3030
public var packagePath: AbsolutePath?
3131

@@ -49,7 +49,7 @@ public class ToolOptions {
4949

5050
/// If should link the Swift stdlib statically.
5151
public var shouldLinkStaticSwiftStdlib = false
52-
52+
5353
/// If should enable building with llbuild library.
5454
public var shouldEnableLLBuildLibrary = true
5555

0 commit comments

Comments
 (0)