Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/Commands/PackageCommands/AddDependency.swift
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ extension SwiftPackageCommand {
}
}

let editResult = try AddPackageDependency.manifestRefactor(
let editResult = try AddPackageDependency.textRefactor(
syntax: manifestSyntax,
in: .init(dependency: packageDependency)
)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Commands/PackageCommands/AddProduct.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ extension SwiftPackageCommand {
targets: targets
)

let editResult = try SwiftRefactor.AddProduct.manifestRefactor(
let editResult = try SwiftRefactor.AddProduct.textRefactor(
syntax: manifestSyntax,
in: .init(product: product)
)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Commands/PackageCommands/AddSetting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ extension SwiftPackageCommand {
}
}

let editResult: PackageEdit
let editResult: [SourceEdit]

switch setting {
case .experimentalFeature:
Expand Down
3 changes: 2 additions & 1 deletion Sources/Commands/PackageCommands/AddTarget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ extension SwiftPackageCommand {
url: url,
checksum: checksum
)
let editResult = try AddPackageTarget.manifestRefactor(

let editResult = try AddPackageTarget.textRefactor(
syntax: manifestSyntax,
in: .init(
target: target,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ extension SwiftPackageCommand {
dependency = .target(name: dependencyName)
}

let editResult = try SwiftRefactor.AddTargetDependency.manifestRefactor(
let editResult = try SwiftRefactor.AddTargetDependency.textRefactor(
syntax: manifestSyntax,
in: .init(
dependency: dependency,
Expand Down
4 changes: 2 additions & 2 deletions Sources/Commands/Utilities/RefactoringSupport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Basics
@_spi(PackageRefactor) import SwiftRefactor
import SwiftSyntax

package extension PackageEdit {
package extension [SourceEdit] {
/// Apply the edits for the given manifest to the specified file system,
/// updating the manifest to the given manifest
func applyEdits(
Expand All @@ -32,7 +32,7 @@ package extension PackageEdit {
}

let updatedManifestSource = FixItApplier.apply(
edits: manifestEdits,
edits: self,
to: manifest
)
try filesystem.writeFileContents(
Expand Down