Skip to content

Commit 3e0c8e2

Browse files
authored
Remove API that was deprecated during the 5.9 release (#860)
* Remove API that was deprecated during the 5.9 release * Update version information for when deprecated API will be removed The release after 5.10 is not 5.11 but 6.0. The API said 5.12 in their deprecation message was really deprecated during the 5.10 release and should have said 5.11 as the version the API will be removed.
1 parent ebdf7e7 commit 3e0c8e2

20 files changed

+28
-233
lines changed

Sources/SwiftDocC/Indexing/Navigator/NavigatorIndex.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public class NavigatorIndex {
6565
/// Missing bundle identifier.
6666
case missingBundleIdentifier
6767

68-
@available(*, deprecated, renamed: "missingBundleIdentifier", message: "Use 'missingBundleIdentifier' instead. This deprecated API will be removed after 5.11 is released")
68+
@available(*, deprecated, renamed: "missingBundleIdentifier", message: "Use 'missingBundleIdentifier' instead. This deprecated API will be removed after 6.0 is released")
6969
case missingBundleIndentifier
7070

7171
/// A RenderNode has no title and won't be indexed.

Sources/SwiftDocC/Infrastructure/Diagnostics/Diagnostic.swift

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,8 @@ public struct Diagnostic {
3333
/// A brief summary that describe the problem or issue.
3434
public var summary: String
3535

36-
@available(*, deprecated, renamed: "summary", message: "Use 'summary' instead. This deprecated API will be removed after 5.10 is released")
37-
public var localizedSummary: String {
38-
return summary
39-
}
40-
4136
/// Additional details that explain the problem or issue to the end-user in plain language.
4237
public var explanation: String?
43-
44-
@available(*, deprecated, renamed: "explanation", message: "Use 'explanation' instead. This deprecated API will be removed after 5.10 is released")
45-
public var localizedExplanation: String? {
46-
return explanation
47-
}
4838

4939
/// Extra notes to tack onto the editor for additional information.
5040
///
@@ -82,18 +72,3 @@ public extension Diagnostic {
8272

8373
}
8474
}
85-
86-
// MARK: Deprecated
87-
88-
@available(*, deprecated, message: "Use 'DiagnosticConsoleWriter.formattedDescription(for:options:)' instead. This deprecated API will be removed after 5.10 is released")
89-
extension Diagnostic: DescribedError {
90-
@available(*, deprecated, message: "Use 'DiagnosticConsoleWriter.formattedDescription(for:options:)' instead. This deprecated API will be removed after 5.10 is released")
91-
var localizedDescription: String {
92-
return DiagnosticConsoleWriter.formattedDescription(for: self)
93-
}
94-
95-
@available(*, deprecated, message: "Use 'DiagnosticConsoleWriter.formattedDescription(for:options:)' instead. This deprecated API will be removed after 5.10 is released")
96-
public var errorDescription: String {
97-
return DiagnosticConsoleWriter.formattedDescription(for: self)
98-
}
99-
}

Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticConsoleWriter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public final class DiagnosticConsoleWriter: DiagnosticFormattingConsumer {
7676
}
7777

7878
// This is deprecated but still necessary to implement.
79-
@available(*, deprecated, renamed: "flush()", message: "Use 'flush()' instead. This deprecated API will be removed after 5.11 is released")
79+
@available(*, deprecated, renamed: "flush()", message: "Use 'flush()' instead. This deprecated API will be removed after 6.0 is released")
8080
public func finalize() throws {
8181
try flush()
8282
}

Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticConsumer.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public protocol DiagnosticConsumer: AnyObject {
1717
func receive(_ problems: [Problem])
1818

1919
/// Inform the consumer that the engine has sent all diagnostics for this build.
20-
@available(*, deprecated, renamed: "flush()", message: "Use 'flush()' instead. This deprecated API will be removed after 5.11 is released")
20+
@available(*, deprecated, renamed: "flush()", message: "Use 'flush()' instead. This deprecated API will be removed after 6.0 is released")
2121
func finalize() throws
2222

2323
/// Inform the consumer that the engine has sent all diagnostics in a given context.
@@ -32,7 +32,7 @@ public protocol DiagnosticFormattingConsumer: DiagnosticConsumer {
3232

3333
public extension DiagnosticConsumer {
3434
// Deprecated for suppressing the warning emitted when calling `finalize()`
35-
@available(*, deprecated, message: "This deprecated API will be removed after 5.11 is released")
35+
@available(*, deprecated, message: "This deprecated API will be removed after 6.0 is released")
3636
func flush() throws {
3737
try finalize()
3838
}

Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticEngine.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public final class DiagnosticEngine {
105105
}
106106
}
107107

108-
@available(*, deprecated, renamed: "flush()", message: "Use 'flush()' instead. This deprecated API will be removed after 5.11 is released")
108+
@available(*, deprecated, renamed: "flush()", message: "Use 'flush()' instead. This deprecated API will be removed after 6.0 is released")
109109
public func finalize() {
110110
flush()
111111
}

Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticFormattingOptions.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ public struct DiagnosticFormattingOptions: OptionSet {
1616
self.rawValue = rawValue
1717
}
1818

19-
/// Problem fix-its should be included when printing diagnostics to a file or output stream.
20-
@available(*, deprecated, renamed: "formatConsoleOutputForTools" , message: "Use 'formatConsoleOutputForTools' instead. This deprecated API will be removed after 5.10 is released")
21-
public static let showFixits = formatConsoleOutputForTools
22-
2319
/// Output to the console should be formatted for an IDE or other tool to parse.
2420
public static let formatConsoleOutputForTools = DiagnosticFormattingOptions(rawValue: 1 << 0)
2521

Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticNote.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,3 @@ public struct DiagnosticNote {
2424
/// The message to attach to the document.
2525
public var message: String
2626
}
27-
28-
@available(*, deprecated, message: "Use 'DiagnosticConsoleWriter.formattedDescription(for:options:)' instead. This deprecated API will be removed after 5.10 is released")
29-
extension DiagnosticNote: CustomStringConvertible {
30-
@available(*, deprecated, message: "Use 'DiagnosticConsoleWriter.formattedDescription(for:options:)' instead. This deprecated API will be removed after 5.10 is released")
31-
public var description: String {
32-
let location = "\(source.path):\(range.lowerBound.line):\(range.lowerBound.column)"
33-
return "\(location): note: \(message)"
34-
}
35-
}

Sources/SwiftDocC/Infrastructure/Diagnostics/Problem.swift

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -52,29 +52,3 @@ extension Sequence where Element == Problem {
5252
}
5353
}
5454
}
55-
56-
// MARK: Deprecated
57-
58-
extension Problem {
59-
@available(*, deprecated, message: "Use 'DiagnosticConsoleWriter.formattedDescription(for:options:)' instead. This deprecated API will be removed after 5.10 is released")
60-
var localizedDescription: String {
61-
return DiagnosticConsoleWriter.formattedDescription(for: self)
62-
}
63-
64-
@available(*, deprecated, message: "Use 'DiagnosticConsoleWriter.formattedDescription(for:options:)' instead. This deprecated API will be removed after 5.10 is released")
65-
func formattedLocalizedDescription(withOptions options: DiagnosticFormattingOptions = []) -> String {
66-
return DiagnosticConsoleWriter.formattedDescription(for: self, options: options)
67-
}
68-
}
69-
70-
extension Sequence where Element == Problem {
71-
@available(*, deprecated, message: "Use 'DiagnosticConsoleWriter.formattedDescription(for:options:)' instead. This deprecated API will be removed after 5.10 is released")
72-
public var localizedDescription: String {
73-
return map { $0.localizedDescription }.joined(separator: "\n")
74-
}
75-
76-
@available(*, deprecated, message: "Use 'DiagnosticConsoleWriter.formattedDescription(for:options:)' instead. This deprecated API will be removed after 5.10 is released")
77-
public func formattedLocalizedDescription(withOptions options: DiagnosticFormattingOptions) -> String {
78-
return map { $0.formattedLocalizedDescription(withOptions: options) }.joined(separator: "\n")
79-
}
80-
}

Sources/SwiftDocC/Infrastructure/External Data/Deprecated/DocumentationContext+DeprecatedResolvers.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,31 @@
1111
import Foundation
1212

1313
extension DocumentationContext {
14-
@available(*, deprecated, message: "This deprecated API will be removed after 5.11 is released")
14+
@available(*, deprecated, message: "This deprecated API will be removed after 6.0 is released")
1515
public var _externalAssetResolvers: [BundleIdentifier: _ExternalAssetResolver] {
1616
get { [:] }
1717
set { /* do nothing */ }
1818
}
1919

20-
@available(*, deprecated, renamed: "globalExternalSymbolResolver", message: "Use 'globalExternalSymbolResolver' instead. This deprecated API will be removed after 5.11 is released")
20+
@available(*, deprecated, renamed: "globalExternalSymbolResolver", message: "Use 'globalExternalSymbolResolver' instead. This deprecated API will be removed after 6.0 is released")
2121
public var externalSymbolResolver: ExternalSymbolResolver? {
2222
get { nil }
2323
set { /* do nothing */ }
2424
}
2525

26-
@available(*, deprecated, renamed: "externalDocumentationSources", message: "Use 'externalDocumentationSources' instead. This deprecated API will be removed after 5.11 is released")
26+
@available(*, deprecated, renamed: "externalDocumentationSources", message: "Use 'externalDocumentationSources' instead. This deprecated API will be removed after 6.0 is released")
2727
public var externalReferenceResolvers: [BundleIdentifier: ExternalReferenceResolver] {
2828
get { [:] }
2929
set { /* do nothing */ }
3030
}
3131

32-
@available(*, deprecated, renamed: "convertServiceFallbackResolver", message: "Use 'convertServiceFallbackResolver' instead. This deprecated API will be removed after 5.11 is released")
32+
@available(*, deprecated, renamed: "convertServiceFallbackResolver", message: "Use 'convertServiceFallbackResolver' instead. This deprecated API will be removed after 6.0 is released")
3333
public var fallbackReferenceResolvers: [BundleIdentifier: FallbackReferenceResolver] {
3434
get { [:] }
3535
set { /* do nothing */ }
3636
}
3737

38-
@available(*, deprecated, renamed: "convertServiceFallbackResolver", message: "Use 'convertServiceFallbackResolver' instead. This deprecated API will be removed after 5.11 is released")
38+
@available(*, deprecated, renamed: "convertServiceFallbackResolver", message: "Use 'convertServiceFallbackResolver' instead. This deprecated API will be removed after 6.0 is released")
3939
public var fallbackAssetResolvers: [BundleIdentifier: FallbackAssetResolver] {
4040
get { [:] }
4141
set { /* do nothing */ }

Sources/SwiftDocC/Infrastructure/External Data/Deprecated/OutOfProcessReferenceResolver+DeprecatedResolvers.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ private struct DeprecatedAPIError: DescribedError {
2323

2424
// MARK: External Symbol Resolver
2525

26-
@available(*, deprecated, renamed: "GlobalExternalSymbolResolver", message: "Use 'GlobalExternalSymbolResolver' instead. This deprecated API will be removed after 5.11 is released")
26+
@available(*, deprecated, renamed: "GlobalExternalSymbolResolver", message: "Use 'GlobalExternalSymbolResolver' instead. This deprecated API will be removed after 6.0 is released")
2727
public protocol ExternalSymbolResolver {
2828
func symbolEntity(withPreciseIdentifier preciseIdentifier: String) throws -> DocumentationNode
2929
func urlForResolvedSymbol(reference: ResolvedTopicReference) -> URL?
@@ -49,7 +49,7 @@ extension OutOfProcessReferenceResolver: ExternalSymbolResolver {
4949

5050
// MARK: External Reference Resolver
5151

52-
@available(*, deprecated, renamed: "ExternalDocumentationSource", message: "Use 'ExternalDocumentationSource' instead. This deprecated API will be removed after 5.11 is released")
52+
@available(*, deprecated, renamed: "ExternalDocumentationSource", message: "Use 'ExternalDocumentationSource' instead. This deprecated API will be removed after 6.0 is released")
5353
public protocol ExternalReferenceResolver {
5454
func resolve(_ reference: TopicReference, sourceLanguage: SourceLanguage) -> TopicReferenceResolutionResult
5555
func entity(with reference: ResolvedTopicReference) throws -> DocumentationNode
@@ -75,7 +75,7 @@ extension OutOfProcessReferenceResolver: ExternalReferenceResolver {
7575

7676
// MARK: Fallback Reference Resolver
7777

78-
@available(*, deprecated, renamed: "ConvertServiceFallbackResolver", message: "Use 'ConvertServiceFallbackResolver' instead. This deprecated API will be removed after 5.11 is released")
78+
@available(*, deprecated, renamed: "ConvertServiceFallbackResolver", message: "Use 'ConvertServiceFallbackResolver' instead. This deprecated API will be removed after 6.0 is released")
7979
public protocol FallbackReferenceResolver {
8080
func resolve(_ reference: TopicReference, sourceLanguage: SourceLanguage) -> TopicReferenceResolutionResult
8181
func entityIfPreviouslyResolved(with reference: ResolvedTopicReference) throws -> DocumentationNode?
@@ -97,7 +97,7 @@ extension OutOfProcessReferenceResolver: FallbackReferenceResolver {
9797

9898
// MARK: Fallback Asset Resolver
9999

100-
@available(*, deprecated, renamed: "ConvertServiceFallbackResolver", message: "Use 'ConvertServiceFallbackResolver' instead. This deprecated API will be removed after 5.11 is released")
100+
@available(*, deprecated, renamed: "ConvertServiceFallbackResolver", message: "Use 'ConvertServiceFallbackResolver' instead. This deprecated API will be removed after 6.0 is released")
101101
public protocol FallbackAssetResolver {
102102
func resolve(assetNamed assetName: String, bundleIdentifier: String) -> DataAsset?
103103
}
@@ -112,7 +112,7 @@ extension OutOfProcessReferenceResolver: FallbackAssetResolver {
112112

113113
// MARK: External Asset Resolver
114114

115-
@available(*, deprecated, message: "This protocol is not used. This deprecated API will be removed after 5.11 is released")
115+
@available(*, deprecated, message: "This protocol is not used. This deprecated API will be removed after 6.0 is released")
116116
public protocol _ExternalAssetResolver {
117117
func _resolveExternalAsset(named assetName: String, bundleIdentifier: String) -> DataAsset?
118118
}

0 commit comments

Comments
 (0)