Skip to content

Commit f77e323

Browse files
update invalidation logic for DocC catalogs
1 parent b9e93f7 commit f77e323

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Sources/DocCDocumentation/DocCDocumentationManager.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ package struct DocCDocumentationManager: Sendable {
3838

3939
package func filesDidChange(_ events: [FileEvent]) async {
4040
for event in events {
41-
guard let target = await buildSystemManager.canonicalTarget(for: event.uri),
42-
let catalogURL = await buildSystemManager.doccCatalog(for: target)
43-
else {
44-
continue
41+
for target in await buildSystemManager.targets(for: event.uri) {
42+
guard let catalogURL = await buildSystemManager.doccCatalog(for: target) else {
43+
continue
44+
}
45+
await catalogIndexManager.invalidate(catalogURL)
4546
}
46-
await catalogIndexManager.invalidate(catalogURL)
4747
}
4848
}
4949

@@ -56,6 +56,7 @@ package struct DocCDocumentationManager: Sendable {
5656
/// - Parameters:
5757
/// - symbolUSR: The USR of the symbol to render
5858
/// - symbolGraph: The symbol graph that includes the given symbol USR
59+
/// - overrideDocComments: An array of documentation comment lines that will override the comments in the symbol graph
5960
/// - markupFile: The markdown article or symbol extension to render
6061
/// - tutorialFile: The tutorial file to render
6162
/// - moduleName: The name of the Swift module that will be rendered

0 commit comments

Comments
 (0)