Skip to content

Commit 5868704

Browse files
committed
Another CI error
1 parent 8dfb610 commit 5868704

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Sources/SwiftBuildSupport/BuildSystem.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ extension BuildSubset {
1414
var pifTargetName: String {
1515
switch self {
1616
case .product(let name, _):
17-
PackagePIFBuilder.targetName(forProductName: name)
17+
targetName(forProductName: name)
1818
case .target(let name, _):
1919
name
2020
case .allExcludingTests:

Sources/SwiftBuildSupport/PackagePIFBuilder+Helpers.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ import struct PackageGraph.ResolvedProduct
5555

5656
import func PackageLoading.pkgConfigArgs
5757

58+
// TODO: Move this back to `PackagePIFBuilder` once we get rid of `#if canImport(SwiftBuild)`.
59+
func targetName(forProductName name: String, suffix: TargetSuffix? = nil) -> String {
60+
let suffix = suffix?.rawValue ?? ""
61+
return "\(name)\(suffix)-product"
62+
}
63+
5864
#if canImport(SwiftBuild)
5965

6066
import enum SwiftBuild.ProjectModel
@@ -145,8 +151,7 @@ extension PackagePIFBuilder {
145151
/// This format helps make sure that targets and products with the same name (as they often have) have different
146152
/// target names in the PIF.
147153
static func targetName(forProductName name: String, suffix: TargetSuffix? = nil) -> String {
148-
let suffix = suffix?.rawValue ?? ""
149-
return "\(name)\(suffix)-product"
154+
return SwiftBuildSupport.targetName(forProductName: name, suffix: suffix)
150155
}
151156
}
152157

0 commit comments

Comments
 (0)