Skip to content

Commit e4d004f

Browse files
authored
Remove API that was deprecated during the 6.0 release (#1185)
1 parent 18c027e commit e4d004f

15 files changed

+12
-511
lines changed

Sources/SwiftDocC/Converter/DocumentationContextConverter.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-2024 Apple Inc. and the Swift project authors
4+
Copyright (c) 2021-2025 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
@@ -101,9 +101,4 @@ public class DocumentationContextConverter {
101101
)
102102
return translator.visit(node.semantic) as? RenderNode
103103
}
104-
105-
@available(*, deprecated, renamed: "renderNode(for:)", message: "Use 'renderNode(for:)' instead. This deprecated API will be removed after 6.1 is released")
106-
public func renderNode(for node: DocumentationNode, at source: URL?) throws -> RenderNode? {
107-
self.renderNode(for: node)
108-
}
109104
}

Sources/SwiftDocC/Converter/DocumentationNodeConverter.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 Apple Inc. and the Swift project authors
4+
Copyright (c) 2021-2025 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
@@ -40,9 +40,4 @@ public struct DocumentationNodeConverter {
4040
var translator = RenderNodeTranslator(context: context, bundle: bundle, identifier: node.reference)
4141
return translator.visit(node.semantic) as! RenderNode
4242
}
43-
44-
@available(*, deprecated, renamed: "convert(_:)", message: "Use 'convert(_:)' instead. This deprecated API will be removed after 6.1 is released")
45-
public func convert(_ node: DocumentationNode, at source: URL?) throws -> RenderNode {
46-
return convert(node)
47-
}
4843
}

Sources/SwiftDocC/Converter/Rewriter/RemoveAutomaticallyCuratedSeeAlsoSectionsTransformation.swift

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

Sources/SwiftDocC/Indexing/Navigator/NavigatorIndex+Ext.swift

Lines changed: 1 addition & 11 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-2024 Apple Inc. and the Swift project authors
4+
Copyright (c) 2021-2025 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
@@ -72,14 +72,4 @@ public class FileSystemRenderNodeProvider: RenderNodeProvider {
7272
public func getProblems() -> [Problem] {
7373
return problems
7474
}
75-
76-
}
77-
78-
extension RenderNode {
79-
/// Returns the NavigatorIndex.PageType indicating the type of the page.
80-
@_disfavoredOverload
81-
@available(*, deprecated, message: "This deprecated API will be removed after 6.1 is released")
82-
public func navigatorPageType() -> NavigatorIndex.PageType {
83-
return (self as any NavigatorIndexableRenderNodeRepresentation).navigatorPageType()
84-
}
8575
}

Sources/SwiftDocC/Indexing/Navigator/NavigatorTree.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 Apple Inc. and the Swift project authors
4+
Copyright (c) 2021-2025 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
@@ -181,11 +181,6 @@ public class NavigatorTree {
181181

182182
self.root = root
183183
}
184-
185-
@available(*, deprecated, renamed: "read(from:bundleIdentifier:timeout:delay:queue:presentationIdentifier:broadcast:)", message: "Use 'read(from:bundleIdentifier:timeout:delay:queue:presentationIdentifier:broadcast:)' instead. This deprecated API will be removed after 6.1 is released")
186-
public func read(from url: URL, bundleIdentifier: String? = nil, interfaceLanguages: Set<InterfaceLanguage>, timeout: TimeInterval, delay: TimeInterval = 0.01, queue: DispatchQueue, presentationIdentifier: String? = nil, broadcast: BroadcastCallback?) throws {
187-
try self.read(from: url, bundleIdentifier: bundleIdentifier, timeout: timeout, delay: delay, queue: queue, presentationIdentifier: presentationIdentifier, broadcast: broadcast)
188-
}
189184

190185
/**
191186
Serialize the node and descendants to the disk.

Sources/SwiftDocC/Indexing/RenderNode+Relationships.swift

Lines changed: 1 addition & 11 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-2024 Apple Inc. and the Swift project authors
4+
Copyright (c) 2021-2025 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
@@ -11,16 +11,6 @@
1111
import Foundation
1212

1313
extension RenderNode {
14-
15-
/**
16-
Returns a list of references for children pages.
17-
18-
- Returns: A list of `RenderRelationshipsGroup`.
19-
*/
20-
@available(*, deprecated, message: "This deprecated API will be removed after 6.1 is released")
21-
public func childrenRelationship(for language: String? = nil) -> [RenderRelationshipsGroup] {
22-
return (self as any NavigatorIndexableRenderNodeRepresentation).navigatorChildren(for: nil)
23-
}
2414

2515
/**
2616
Return the project files for a given `RenderNode`, if possible.

Sources/SwiftDocC/Infrastructure/DocumentationBundle.swift

Lines changed: 1 addition & 21 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-2024 Apple Inc. and the Swift project authors
4+
Copyright (c) 2021-2025 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
@@ -77,10 +77,6 @@ public struct DocumentationBundle {
7777
info.version
7878
}
7979

80-
/// Code listings extracted from the documented modules' source, indexed by their identifier.
81-
@available(*, deprecated, message: "This deprecated API will be removed after 6.1 is released")
82-
public var attributedCodeListings: [String: AttributedCodeListing] = [:]
83-
8480
/// Symbol graph JSON input files for the module that's represented by this unit of documentation.
8581
///
8682
/// Tutorial or article-only documentation won't have any symbol graph JSON files.
@@ -151,22 +147,6 @@ public struct DocumentationBundle {
151147
self.articlesDocumentationRootReference = documentationRootReference.appendingPath(urlReadablePath(info.displayName))
152148
}
153149

154-
@available(*, deprecated, renamed: "init(info:baseURL:symbolGraphURLs:markupURLs:miscResourceURLs:customHeader:customFooter:themeSettings:)", message: "Use 'init(info:baseURL:symbolGraphURLs:markupURLs:miscResourceURLs:customHeader:customFooter:themeSettings:)' instead. This deprecated API will be removed after 6.1 is released")
155-
public init(
156-
info: Info,
157-
baseURL: URL = URL(string: "/")!,
158-
attributedCodeListings: [String: AttributedCodeListing] = [:],
159-
symbolGraphURLs: [URL],
160-
markupURLs: [URL],
161-
miscResourceURLs: [URL],
162-
customHeader: URL? = nil,
163-
customFooter: URL? = nil,
164-
themeSettings: URL? = nil
165-
) {
166-
self.init(info: info, baseURL: baseURL, symbolGraphURLs: symbolGraphURLs, markupURLs: markupURLs, miscResourceURLs: miscResourceURLs, customHeader: customHeader, customFooter: customFooter, themeSettings: themeSettings)
167-
self.attributedCodeListings = attributedCodeListings
168-
}
169-
170150
public private(set) var rootReference: ResolvedTopicReference
171151

172152
/// Default path to resolve symbol links.

Sources/SwiftDocC/Infrastructure/DocumentationBundleFileTypes.swift

Lines changed: 1 addition & 8 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-2024 Apple Inc. and the Swift project authors
4+
Copyright (c) 2021-2025 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
@@ -85,10 +85,3 @@ public enum DocumentationBundleFileTypes {
8585
return url.lastPathComponent == themeSettingsFileName
8686
}
8787
}
88-
89-
extension DocumentationBundleFileTypes {
90-
@available(*, deprecated, renamed: "isDocumentationCatalog(_:)", message: "Use 'isDocumentationCatalog(_:)' instead. This deprecated API will be removed after 6.1 is released")
91-
public static func isDocumentationBundle(_ url: URL) -> Bool {
92-
isDocumentationCatalog(url)
93-
}
94-
}

Sources/SwiftDocC/Infrastructure/DocumentationContext.swift

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3127,21 +3127,6 @@ public class DocumentationContext {
31273127
return nil
31283128
}
31293129
}
3130-
3131-
/// Attempt to resolve an unresolved code listing.
3132-
///
3133-
/// - Parameters:
3134-
/// - unresolvedCodeListingReference: The code listing reference to resolve.
3135-
/// - parent: The topic the code listing reference appears in.
3136-
@available(*, deprecated, message: "This deprecated API will be removed after 6.1 is released")
3137-
public func resolveCodeListing(_ unresolvedCodeListingReference: UnresolvedCodeListingReference, in parent: ResolvedTopicReference) -> AttributedCodeListing? {
3138-
switch dataProvider {
3139-
case .legacy(let legacyDataProvider):
3140-
legacyDataProvider.bundles[parent.bundleIdentifier]?.attributedCodeListings[unresolvedCodeListingReference.identifier]
3141-
case .new:
3142-
nil
3143-
}
3144-
}
31453130

31463131
/// The references of all nodes in the topic graph.
31473132
public var knownIdentifiers: [ResolvedTopicReference] {

Sources/SwiftDocC/Model/Content/AttributedCodeListing.swift

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

0 commit comments

Comments
 (0)