Skip to content

Commit f66f704

Browse files
authored
Remove API that was deprecated during the 5.10 release (#1029)
1 parent 2a4c47b commit f66f704

File tree

15 files changed

+9
-347
lines changed

15 files changed

+9
-347
lines changed

Sources/SwiftDocC/Indexing/Navigator/NavigatorIndex.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ 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 6.0 is released")
69-
case missingBundleIndentifier
70-
7168
/// A RenderNode has no title and won't be indexed.
7269
case missingTitle(description: String)
7370

@@ -76,7 +73,7 @@ public class NavigatorIndex {
7673

7774
public var errorDescription: String {
7875
switch self {
79-
case .missingBundleIdentifier, .missingBundleIndentifier:
76+
case .missingBundleIdentifier:
8077
return "A navigator index requires a bundle identifier, which is missing."
8178
case .missingTitle:
8279
return "The page has no valid title available."

Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticConsoleWriter.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,6 @@ public final class DiagnosticConsoleWriter: DiagnosticFormattingConsumer {
7575
self.diagnosticFormatter.finalize()
7676
}
7777

78-
// This is deprecated but still necessary to implement.
79-
@available(*, deprecated, renamed: "flush()", message: "Use 'flush()' instead. This deprecated API will be removed after 6.0 is released")
80-
public func finalize() throws {
81-
try flush()
82-
}
83-
8478
private static func makeDiagnosticFormatter(
8579
_ options: DiagnosticFormattingOptions,
8680
baseURL: URL?,
Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
This source file is part of the Swift.org open source project
33

4-
Copyright (c) 2021-2023 Apple Inc. and the Swift project authors
4+
Copyright (c) 2021-2024 Apple Inc. and the Swift project authors
55
Licensed under Apache License v2.0 with Runtime Library Exception
66

77
See https://swift.org/LICENSE.txt for license information
@@ -16,10 +16,6 @@ public protocol DiagnosticConsumer: AnyObject {
1616
/// - Parameter problems: The encountered diagnostics.
1717
func receive(_ problems: [Problem])
1818

19-
/// 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 6.0 is released")
21-
func finalize() throws
22-
2319
/// Inform the consumer that the engine has sent all diagnostics in a given context.
2420
func flush() throws
2521
}
@@ -29,11 +25,3 @@ public protocol DiagnosticFormattingConsumer: DiagnosticConsumer {
2925
/// Options for how problems should be formatted if written to output.
3026
var formattingOptions: DiagnosticFormattingOptions { get set }
3127
}
32-
33-
public extension DiagnosticConsumer {
34-
// Deprecated for suppressing the warning emitted when calling `finalize()`
35-
@available(*, deprecated, message: "This deprecated API will be removed after 6.0 is released")
36-
func flush() throws {
37-
try finalize()
38-
}
39-
}

Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticEngine.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
This source file is part of the Swift.org open source project
33

4-
Copyright (c) 2021-2022 Apple Inc. and the Swift project authors
4+
Copyright (c) 2021-2024 Apple Inc. and the Swift project authors
55
Licensed under Apache License v2.0 with Runtime Library Exception
66

77
See https://swift.org/LICENSE.txt for license information
@@ -105,11 +105,6 @@ public final class DiagnosticEngine {
105105
}
106106
}
107107

108-
@available(*, deprecated, renamed: "flush()", message: "Use 'flush()' instead. This deprecated API will be removed after 6.0 is released")
109-
public func finalize() {
110-
flush()
111-
}
112-
113108
public func flush() {
114109
workQueue.sync {
115110
for consumer in self.consumers.sync({ $0.values }) {

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

Lines changed: 0 additions & 43 deletions
This file was deleted.

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

Lines changed: 0 additions & 126 deletions
This file was deleted.

Sources/SwiftDocC/Infrastructure/Workspace/DefaultAvailability.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ public struct DefaultAvailability: Codable, Equatable {
6464
/// The availability version state information, e.g unavailable
6565
internal var versionInformation: VersionInformation
6666

67-
/// A string representation of the version for this platform.
68-
@available(*, deprecated, message: "Use `introducedVersion` instead. This deprecated API will be removed after 6.0 is released", renamed: "introducedVersion")
69-
public var platformVersion: String {
70-
return introducedVersion ?? "0.0"
71-
}
72-
7367
/// A string representation of the version for this platform
7468
/// or nil if it's unavailable.
7569
public var introducedVersion: String? {

Sources/SwiftDocC/Model/Rendering/Variants/RenderNodeVariantOverridesApplier.swift

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,4 @@ public struct RenderNodeVariantOverridesApplier {
4242
private struct RenderNodeVariantsProxy: Codable {
4343
var variantOverrides: VariantOverrides?
4444
}
45-
46-
@available(*, deprecated, message: "This error is never raised. This deprecated API will be removed after 6.0 is released")
47-
public enum Error: DescribedError {
48-
case corruptedRenderNode
49-
public var errorDescription: String {
50-
switch self {
51-
case .corruptedRenderNode:
52-
return "Corrupted or malformed render node value."
53-
}
54-
}
55-
}
5645
}

Sources/SwiftDocC/Semantics/Symbol/Symbol.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -595,10 +595,6 @@ extension Symbol {
595595

596596
/// The first variant of the symbol's platform, if available.
597597
public var platformName: PlatformName? { platformNameVariants.firstValue }
598-
599-
/// The first variant of the symbol's extended module, if available
600-
@available(*, deprecated, message: "Use 'extendedModuleVariants' instead. This deprecated API will be removed after 6.0 is released")
601-
public var extendedModule: String? { extendedModuleVariants.firstValue }
602598

603599
/// Whether the first variant of the symbol is required in its context.
604600
public var isRequired: Bool {

Sources/SwiftDocCUtilities/ArgumentParsing/ActionExtensions/ConvertAction+CommandInitialization.swift

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
This source file is part of the Swift.org open source project
33

4-
Copyright (c) 2021-2023 Apple Inc. and the Swift project authors
4+
Copyright (c) 2021-2024 Apple Inc. and the Swift project authors
55
Licensed under Apache License v2.0 with Runtime Library Exception
66

77
See https://swift.org/LICENSE.txt for license information
@@ -44,9 +44,7 @@ extension ConvertAction {
4444
// into a dictionary. This will throw with a descriptive error upon failure.
4545
let parsedPlatforms = try PlatformArgumentParser.parse(convert.platforms)
4646

47-
let additionalSymbolGraphFiles = (convert as _DeprecatedSymbolGraphFilesAccess).additionalSymbolGraphFiles + symbolGraphFiles(
48-
in: convert.additionalSymbolGraphDirectory
49-
)
47+
let additionalSymbolGraphFiles = symbolGraphFiles(in: convert.additionalSymbolGraphDirectory)
5048

5149
let bundleDiscoveryOptions = BundleDiscoveryOptions(
5250
fallbackDisplayName: convert.fallbackBundleDisplayName,
@@ -104,8 +102,3 @@ private func symbolGraphFiles(in directory: URL?) -> [URL] {
104102
return subpaths.map { directory.appendingPathComponent($0) }
105103
.filter { DocumentationBundleFileTypes.isSymbolGraphFile($0) }
106104
}
107-
108-
private protocol _DeprecatedSymbolGraphFilesAccess {
109-
var additionalSymbolGraphFiles: [URL] { get }
110-
}
111-
extension Docc.Convert: _DeprecatedSymbolGraphFilesAccess {}

0 commit comments

Comments
 (0)