Skip to content

Commit 4f8f01a

Browse files
authored
Rename stragging "extension" cases to "plugin" (#3324)
Follow-up to #3311 where "extension" was renamed to "plugin". This commit makes that same change in `PackageCollectionModel.V1.ProductType` and other related sites.
1 parent d1ef837 commit 4f8f01a

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Sources/PackageCollections/Providers/JSONPackageCollectionProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ extension PackageModel.ProductType {
354354
self = .library(.init(from: libraryType))
355355
case .executable:
356356
self = .executable
357-
case .extension:
357+
case .plugin:
358358
self = .plugin
359359
case .test:
360360
self = .test

Sources/PackageCollectionsModel/PackageCollectionModel+v1.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,8 @@ extension PackageCollectionModel.V1 {
325325
/// An executable product.
326326
case executable
327327

328-
/// An extension product.
329-
case `extension`
328+
/// An plugin product.
329+
case plugin
330330

331331
/// A test product.
332332
case test
@@ -335,7 +335,7 @@ extension PackageCollectionModel.V1 {
335335

336336
extension PackageCollectionModel.V1.ProductType: Codable {
337337
private enum CodingKeys: String, CodingKey {
338-
case library, executable, `extension`, test
338+
case library, executable, plugin, test
339339
}
340340

341341
public func encode(to encoder: Encoder) throws {
@@ -346,8 +346,8 @@ extension PackageCollectionModel.V1.ProductType: Codable {
346346
try unkeyedContainer.encode(a1)
347347
case .executable:
348348
try container.encodeNil(forKey: .executable)
349-
case .extension:
350-
try container.encodeNil(forKey: .extension)
349+
case .plugin:
350+
try container.encodeNil(forKey: .plugin)
351351
case .test:
352352
try container.encodeNil(forKey: .test)
353353
}
@@ -367,8 +367,8 @@ extension PackageCollectionModel.V1.ProductType: Codable {
367367
self = .test
368368
case .executable:
369369
self = .executable
370-
case .extension:
371-
self = .extension
370+
case .plugin:
371+
self = .plugin
372372
}
373373
}
374374
}

Sources/SPMBuildCore/PluginInvocation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ public protocol PluginScriptRunner {
316316
fileSystem: FileSystem
317317
) throws -> (outputJSON: Data, stdoutText: Data)
318318

319-
@available(*, deprecated, message: "used runPlugin() instead")
319+
@available(*, deprecated, message: "use runPluginScript() instead")
320320
func runExtension(
321321
sources: Sources,
322322
inputJSON: Data,

0 commit comments

Comments
 (0)