Skip to content

Commit fc82a10

Browse files
committed
use url
1 parent 006bc07 commit fc82a10

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Plugins/CodeGeneratorPlugin.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@ import PackagePlugin
44
@main
55
struct CodeGeneratorPlugin: BuildToolPlugin {
66
func createBuildCommands(context: PackagePlugin.PluginContext, target _: PackagePlugin.Target) async throws -> [PackagePlugin.Command] {
7-
let output = context.pluginWorkDirectory
7+
let output = context.pluginWorkDirectoryURL
88
let floatingPointTypes: [String] = ["Float", "Double"]
99
let simdSizes = [2, 4, 8, 16, 32, 64]
1010

1111
let outputFiles = floatingPointTypes.flatMap { floatingPointType in
1212
simdSizes.flatMap { simdSize in
1313
[
14-
output.appending("SIMD\(simdSize)+\(floatingPointType)+RealFunctions.swift"),
15-
output.appending("SIMD\(simdSize)+\(floatingPointType)+RealFunctions+Derivatives.swift"),
14+
output.appending(component: "SIMD\(simdSize)+\(floatingPointType)+RealFunctions.swift"),
15+
output.appending(component: "SIMD\(simdSize)+\(floatingPointType)+RealFunctions+Derivatives.swift"),
1616
]
1717
} + [
18-
output.appending("\(floatingPointType)+RealFunctions+Derivatives.swift"),
18+
output.appending(component: "\(floatingPointType)+RealFunctions+Derivatives.swift"),
1919
]
2020
} + [
21-
output.appending("SIMD+RealFunctions.swift"),
21+
output.appending(component: "SIMD+RealFunctions.swift"),
2222
]
2323

2424
return [
2525
.buildCommand(
2626
displayName: "Generate Code",
27-
executable: try context.tool(named: "CodeGeneratorExecutable").path,
28-
arguments: [output.string],
27+
executable: try context.tool(named: "CodeGeneratorExecutable").url,
28+
arguments: [output.relativePath],
2929
environment: [:],
3030
inputFiles: [],
3131
outputFiles: outputFiles

0 commit comments

Comments
 (0)