Skip to content

Rename straggling "extension" cases to "plugin" #3324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ extension PackageModel.ProductType {
self = .library(.init(from: libraryType))
case .executable:
self = .executable
case .extension:
case .plugin:
self = .plugin
case .test:
self = .test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ extension PackageCollectionModel.V1 {
/// An executable product.
case executable

/// An extension product.
case `extension`
/// An plugin product.
case plugin

/// A test product.
case test
Expand All @@ -335,7 +335,7 @@ extension PackageCollectionModel.V1 {

extension PackageCollectionModel.V1.ProductType: Codable {
private enum CodingKeys: String, CodingKey {
case library, executable, `extension`, test
case library, executable, plugin, test
}

public func encode(to encoder: Encoder) throws {
Expand All @@ -346,8 +346,8 @@ extension PackageCollectionModel.V1.ProductType: Codable {
try unkeyedContainer.encode(a1)
case .executable:
try container.encodeNil(forKey: .executable)
case .extension:
try container.encodeNil(forKey: .extension)
case .plugin:
try container.encodeNil(forKey: .plugin)
case .test:
try container.encodeNil(forKey: .test)
}
Expand All @@ -367,8 +367,8 @@ extension PackageCollectionModel.V1.ProductType: Codable {
self = .test
case .executable:
self = .executable
case .extension:
self = .extension
case .plugin:
self = .plugin
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/SPMBuildCore/PluginInvocation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public protocol PluginScriptRunner {
fileSystem: FileSystem
) throws -> (outputJSON: Data, stdoutText: Data)

@available(*, deprecated, message: "used runPlugin() instead")
@available(*, deprecated, message: "use runPluginScript() instead")
func runExtension(
sources: Sources,
inputJSON: Data,
Expand Down