File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
Sources/SwiftRefactor/PackageManifest Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ public struct AddPackageDependency: ManifestEditRefactoringProvider {
8686
8787 if let existingDependencies = packageCall. findArgument ( labeled: " dependencies " ) {
8888 // If we have an existing dependencies array, we need to check if
89+ // it's already added.
8990 if let expr = existingDependencies. expression. as ( ArrayExprSyntax . self) {
9091 // Iterate through existing dependencies and look for an argument that matches
9192 // either the `id` or `url` argument of the new dependency.
Original file line number Diff line number Diff line change @@ -27,10 +27,6 @@ public struct AddPluginUsage: ManifestEditRefactoringProvider {
2727 }
2828 }
2929
30- /// The set of argument labels that can occur after the "plugins"
31- /// argument in the Target initializers. (There aren't any right now)
32- private static let argumentLabelsAfterPluginUsages : Set < String > = [ ]
33-
3430 /// Produce the set of source edits needed to add the given package
3531 /// dependency to the given manifest file.
3632 public static func manifestRefactor(
@@ -49,7 +45,7 @@ public struct AddPluginUsage: ManifestEditRefactoringProvider {
4945
5046 let newTargetCall = try targetCall. appendingToArrayArgument (
5147 label: " plugins " ,
52- labelsAfter: Self . argumentLabelsAfterPluginUsages ,
48+ labelsAfter: [ ] ,
5349 newElement: pluginUsage. asSyntax ( )
5450 )
5551
You can’t perform that action at this time.
0 commit comments