@@ -3,30 +3,29 @@ import PackagePlugin
33
44@main
55struct CodeGeneratorPlugin : BuildToolPlugin {
6- func createBuildCommands( context: PackagePlugin . PluginContext , target: PackagePlugin . Target ) async throws -> [ PackagePlugin . Command ] {
7- let output = context. pluginWorkDirectoryURL. appending ( component: " GeneratedCode " )
8-
6+ func createBuildCommands( context: PackagePlugin . PluginContext , target _: PackagePlugin . Target ) async throws -> [ PackagePlugin . Command ] {
7+ let output = context. pluginWorkDirectory. appending ( " GeneratedCode " )
98 let floatingPointTypes : [ String ] = [ " Float " , " Double " ]
109 let simdSizes = [ 2 , 4 , 8 , 16 , 32 , 64 ]
1110
1211 let outputFiles = floatingPointTypes. flatMap { floatingPointType in
1312 simdSizes. flatMap { simdSize in
1413 [
15- output. appending ( component : " SIMD \( simdSize) + \( floatingPointType) +RealFunctions.swift " ) ,
16- output. appending ( component : " SIMD \( simdSize) + \( floatingPointType) +RealFunctions+Derivatives.swift " ) ,
14+ output. appending ( " SIMD \( simdSize) + \( floatingPointType) +RealFunctions.swift " ) ,
15+ output. appending ( " SIMD \( simdSize) + \( floatingPointType) +RealFunctions+Derivatives.swift " ) ,
1716 ]
1817 } + [
19- output. appending ( component : " \( floatingPointType) +RealFunctions+Derivatives.swift " ) ,
18+ output. appending ( " \( floatingPointType) +RealFunctions+Derivatives.swift " ) ,
2019 ]
2120 } + [
22- output. appending ( component : " SIMD+RealFunctions.swift " )
21+ output. appending ( " SIMD+RealFunctions.swift " ) ,
2322 ]
2423
2524 return [
2625 . buildCommand(
2726 displayName: " Generate Code " ,
28- executable: try context. tool ( named: " CodeGeneratorExecutable " ) . url ,
29- arguments: [ output. absoluteString ] ,
27+ executable: try context. tool ( named: " CodeGeneratorExecutable " ) . path ,
28+ arguments: [ output. string ] ,
3029 environment: [ : ] ,
3130 inputFiles: [ ] ,
3231 outputFiles: outputFiles
0 commit comments