File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Sources/Commands/PackageCommands Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,8 @@ import Basics
15
15
import CoreCommands
16
16
import Foundation
17
17
import PackageGraph
18
- import PackageModel
19
- import PackageModelSyntax
20
18
import SwiftParser
19
+ @_spi ( PackageRefactor) import SwiftRefactor
21
20
import SwiftSyntax
22
21
import TSCBasic
23
22
import TSCUtility
@@ -80,23 +79,23 @@ extension SwiftPackageCommand {
80
79
}
81
80
82
81
// Map the product type.
83
- let type : ProductType = switch self . type {
82
+ let type : ProductDescription . ProductType = switch self . type {
84
83
case . executable: . executable
85
84
case . library: . library( . automatic)
86
85
case . dynamicLibrary: . library( . dynamic)
87
86
case . staticLibrary: . library( . static)
88
87
case . plugin: . plugin
89
88
}
90
89
91
- let product = try ProductDescription (
90
+ let product = ProductDescription (
92
91
name: name,
93
92
type: type,
94
93
targets: targets
95
94
)
96
95
97
- let editResult = try PackageModelSyntax . AddProduct. addProduct (
98
- product ,
99
- to : manifestSyntax
96
+ let editResult = try SwiftRefactor . AddProduct. manifestRefactor (
97
+ syntax : manifestSyntax ,
98
+ in : . init ( product : product )
100
99
)
101
100
102
101
try editResult. applyEdits (
You can’t perform that action at this time.
0 commit comments