Skip to content

Commit d720379

Browse files
committed
Clarify doc comment for OutOfProcessReferenceResolver.declarationFragments
These declaration fragments are directly used to populate `TopicRenderReference.fragmentsVariants` [1], which is described as "The abbreviated declaration of the symbol to display in links" [2]. This change clarifies that the declaration fragments are expected to be the abbreviated declaration fragments. [1]: https://github.com/swiftlang/swift-docc/blob/65aaf926ec079ddbd40f29540d4180a70af99e5e/Sources/SwiftDocC/Infrastructure/External%20Data/OutOfProcessReferenceResolver.swift#L169 [2]: https://github.com/swiftlang/swift-docc/blob/65aaf926ec079ddbd40f29540d4180a70af99e5e/Sources/SwiftDocC/Model/Rendering/References/TopicRenderReference.swift#L50-L53
1 parent 9413c59 commit d720379

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Sources/SwiftDocC/Infrastructure/External Data/OutOfProcessReferenceResolver+DeprecatedCommunication.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ extension OutOfProcessReferenceResolver {
162162
/// Information about the platforms and their versions where the resolved node is available, if any.
163163
public let platforms: [PlatformAvailability]?
164164
/// Information about the resolved declaration fragments, if any.
165+
///
166+
/// This is expected to be an abbreviated declaration for the symbol.
165167
public let declarationFragments: DeclarationFragments?
166168

167169
// We use the real types here because they're Codable and don't have public member-wise initializers.
@@ -205,7 +207,7 @@ extension OutOfProcessReferenceResolver {
205207
/// - language: The resolved language.
206208
/// - availableLanguages: The languages where the resolved node is available.
207209
/// - platforms: The platforms and their versions where the resolved node is available, if any.
208-
/// - declarationFragments: The resolved declaration fragments, if any.
210+
/// - declarationFragments: The resolved declaration fragments, if any. This is expected to be an abbreviated declaration for the symbol.
209211
/// - topicImages: Images that are used to represent the summarized element.
210212
/// - references: References used in the content of the summarized element.
211213
/// - variants: The variants of content for this resolver information.
@@ -259,6 +261,8 @@ extension OutOfProcessReferenceResolver {
259261
public let language: VariantValue<SourceLanguage>
260262
/// The declaration fragments of the variant or `nil` if the declaration is the same as the resolved information.
261263
///
264+
/// This is expected to be an abbreviated declaration for the symbol.
265+
///
262266
/// If the resolver information has a declaration but the variant doesn't, this property will be `Optional.some(nil)`.
263267
public let declarationFragments: VariantValue<DeclarationFragments?>
264268

@@ -271,7 +275,7 @@ extension OutOfProcessReferenceResolver {
271275
/// - title: The resolved title
272276
/// - abstract: The resolved (plain text) abstract.
273277
/// - language: The resolved language.
274-
/// - declarationFragments: The resolved declaration fragments, if any.
278+
/// - declarationFragments: The resolved declaration fragments, if any. This is expected to be an abbreviated declaration for the symbol.
275279
public init(
276280
traits: [RenderNode.Variant.Trait],
277281
kind: VariantValue<DocumentationNode.Kind> = nil,

0 commit comments

Comments
 (0)