Skip to content

Commit

Permalink
Remove deprecation warning for '--external-encodable-protocols', it w…
Browse files Browse the repository at this point in the history
…as reintroduced in #736
  • Loading branch information
ileitch committed Jul 7, 2024
1 parent 6273b73 commit 0b0407b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
6 changes: 1 addition & 5 deletions Sources/Frontend/Commands/ScanCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct ScanCommand: FrontendCommand {
@Option(parsing: .upToNextOption, help: "Property types to retain if the property is assigned, but never read")
var retainAssignOnlyPropertyTypes: [String] = defaultConfiguration.$retainAssignOnlyPropertyTypes.defaultValue

@Option(parsing: .upToNextOption, help: .private)
@Option(parsing: .upToNextOption, help: "Names of external protocols that inherit Encodable. Properties and CodingKey enums of types conforming to these protocols will be retained")
var externalEncodableProtocols: [String] = defaultConfiguration.$externalEncodableProtocols.defaultValue

@Option(parsing: .upToNextOption, help: "Names of external protocols that inherit Codable. Properties and CodingKey enums of types conforming to these protocols will be retained")
Expand Down Expand Up @@ -135,10 +135,6 @@ struct ScanCommand: FrontendCommand {
try scanBehavior.setup(config).get()
}

if !externalEncodableProtocols.isEmpty {
Logger().warn("The option '--external-encodable-protocols' is deprecated, use '--external-codable-protocols' instead.")
}

let configuration = Configuration.shared
configuration.guidedSetup = setup
configuration.apply(\.$workspace, workspace)
Expand Down
4 changes: 0 additions & 4 deletions Sources/Shared/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ public final class Configuration {

// Non user facing.
public var guidedSetup: Bool = false
public var removalOutputBasePath: FilePath?

// Dependencies.
private var logger: BaseLogger // Must use BaseLogger as Logger depends upon Configuration.
Expand Down Expand Up @@ -330,9 +329,6 @@ public final class Configuration {
case $retainAssignOnlyPropertyTypes.key:
$retainAssignOnlyPropertyTypes.assign(value)
case $externalEncodableProtocols.key:
if !externalEncodableProtocols.isEmpty {
logger.warn("The option '--external-encodable-protocols' is deprecated, use '--external-codable-protocols' instead.")
}
$externalEncodableProtocols.assign(value)
case $externalCodableProtocols.key:
$externalCodableProtocols.assign(value)
Expand Down

0 comments on commit 0b0407b

Please sign in to comment.