Skip to content

Commit ee61890

Browse files
committed
Use new way when building paths based on triple.
In TSC pr #229 and SPM pr #3576, we introduced a method named `platformBuildPathComponent` to distinguish the valid platform path name versus the valid target name, where one may have an embedded version number and the other may not. SourceKit test suite SwiftPMIntegrationTests currently fails. This is presumably because this change may be required as it is one of two uses of `tripleString`. The other uses `tripleString` as the value for the `-target` field, so it is correct as written. The other -- as in this commit -- builds a path. This commit must be committed in concert with the aforementioned prs.
1 parent 1cb9e07 commit ee61890

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/SKSwiftPMWorkspace/SwiftPMWorkspace.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public final class SwiftPMWorkspace {
117117
}
118118

119119
self.buildParameters = BuildParameters(
120-
dataPath: location.workingDirectory.appending(component: triple.tripleString),
120+
dataPath: location.workingDirectory.appending(component: triple.platformBuildPathComponent()),
121121
configuration: buildConfiguration,
122122
toolchain: toolchain,
123123
flags: buildSetup.flags

Tests/SKSwiftPMWorkspaceTests/SwiftPMWorkspaceTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,5 +605,5 @@ private func buildPath(
605605
triple: Triple) -> AbsolutePath
606606
{
607607
let buildPath = config.path ?? root.appending(component: ".build")
608-
return buildPath.appending(components: triple.tripleString, "\(config.configuration)")
608+
return buildPath.appending(components: triple.platformBuildPathComponent(), "\(config.configuration)")
609609
}

0 commit comments

Comments
 (0)