Skip to content

Commit 8bfd711

Browse files
committed
Remove redundant "bundle" parameter from GeneratedDocumentationTopics
1 parent 4922a76 commit 8bfd711

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

Sources/SwiftDocC/Infrastructure/DocumentationContext.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,11 +1228,7 @@ public class DocumentationContext {
12281228
symbolsWithMultipleDocumentationExtensionMatches.removeAll()
12291229

12301230
// Create inherited API collections
1231-
try GeneratedDocumentationTopics.createInheritedSymbolsAPICollections(
1232-
relationships: uniqueRelationships,
1233-
context: self,
1234-
bundle: bundle
1235-
)
1231+
try GeneratedDocumentationTopics.createInheritedSymbolsAPICollections(relationships: uniqueRelationships, context: self)
12361232

12371233
// Parse and prepare the nodes' content concurrently.
12381234
let updatedNodes = signposter.withIntervalSignpost("Parse symbol markup", id: signposter.makeSignpostID()) {

Sources/SwiftDocC/Infrastructure/Symbol Graph/GeneratedDocumentationTopics.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ enum GeneratedDocumentationTopics {
9696

9797
private static let defaultImplementationGroupTitle = "Default Implementations"
9898

99-
private static func createCollectionNode(parent: ResolvedTopicReference, title: String, identifiers: [ResolvedTopicReference], context: DocumentationContext, bundle: DocumentationBundle) throws {
99+
private static func createCollectionNode(parent: ResolvedTopicReference, title: String, identifiers: [ResolvedTopicReference], context: DocumentationContext) throws {
100100
let automaticCurationSourceLanguage: SourceLanguage
101101
let automaticCurationSourceLanguages: Set<SourceLanguage>
102102
automaticCurationSourceLanguage = identifiers.first?.sourceLanguage ?? .swift
103103
automaticCurationSourceLanguages = Set(identifiers.flatMap { identifier in context.sourceLanguages(for: identifier) })
104104

105105
// Create the collection topic reference
106106
let collectionReference = ResolvedTopicReference(
107-
bundleID: bundle.id,
107+
bundleID: context.inputs.id,
108108
path: NodeURLGenerator.Path.documentationCuration(
109109
parentPath: parent.path,
110110
articleName: title
@@ -227,8 +227,7 @@ enum GeneratedDocumentationTopics {
227227
/// - relationships: A set of relationships to inspect.
228228
/// - symbolsURLHierarchy: A symbol graph hierarchy as created during symbol registration.
229229
/// - context: A documentation context to update.
230-
/// - bundle: The current documentation bundle.
231-
static func createInheritedSymbolsAPICollections(relationships: Set<SymbolGraph.Relationship>, context: DocumentationContext, bundle: DocumentationBundle) throws {
230+
static func createInheritedSymbolsAPICollections(relationships: Set<SymbolGraph.Relationship>, context: DocumentationContext) throws {
232231
var inheritanceIndex = InheritedSymbols()
233232

234233
// Walk the symbol graph relationships and look for parent <-> child links that stem in a different module.
@@ -258,7 +257,7 @@ enum GeneratedDocumentationTopics {
258257
for (typeReference, collections) in inheritanceIndex.implementingTypes where !collections.inheritedFromTypeName.isEmpty {
259258
for (_, collection) in collections.inheritedFromTypeName where !collection.identifiers.isEmpty {
260259
// Create a collection for the given provider type's inherited symbols
261-
try createCollectionNode(parent: typeReference, title: collection.title, identifiers: collection.identifiers, context: context, bundle: bundle)
260+
try createCollectionNode(parent: typeReference, title: collection.title, identifiers: collection.identifiers, context: context)
262261
}
263262
}
264263
}

0 commit comments

Comments
 (0)