You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consistently curate language refined symbols in the language specific places (#854)
* Add source language information to nodes in the path hierarchy
rdar://122300247
* Explicitly track when topics are manually curated.
The previous heuristic of checking if a node has more than 1 parent is incorrect when a symbol with multiple language representations exist in different places in different source languages.
* Fix unrelated bug where topic references didn't encode their navigator title variants
* Fix unrelated bug where `SourceLanguage(id:)` didn't recognize C++ IDs
* Fix unrelated bug where handcrafted test data isn't recognized as default implementation
* Use path hierarchy to source automatic curation for symbols
* Update curation tests that were verifying behavior caused by bugs
* Remove test that verifies an behavior that will never occur
Symbols will never be automatically curated under an article. Manually adjusting topic graph edges makes the test unrealistic.
* Fix hand crafted test data that incorrectly mixed source languages in a single symbol graph
* Fix more hand crafted test data that incorrectly mixed source languages in a single symbol graph
* Change isDisfavoredInCollision into a "special behaviors" option set
* Bring over bug fixes from follow up PR
* Unify check that a node matches a language filter
* Minor grammar fix in comment
// This node already has a direct member-of parent. No need to go via the default-implementation-of relationship to find its location in the hierarchy.
@@ -213,15 +230,15 @@ struct PathHierarchy {
213
230
guard knownDisambiguatedPathComponents !=nilelse{
214
231
// If the path hierarchy wasn't passed any "known disambiguated path components" then the sparse/placeholder nodes won't contain any disambiguation.
// If the path hierarchy was passed a lookup of "known disambiguation" path components", then it's possible that each path component could contain disambiguation that needs to be parsed.
// Only symbols in the symbol index are added to the reference map.
@@ -58,6 +57,42 @@ final class PathHierarchyBasedLinkResolver {
58
57
}
59
58
}
60
59
60
+
/// Returns the direct descendants of the given page that match the given source language filter.
61
+
///
62
+
/// A descendant is included if it has a language representation in at least one of the languages in the given language filter or if the language filter is empty.
63
+
///
64
+
/// - Parameters:
65
+
/// - reference: The identifier of the page whose descendants to return.
66
+
/// - languagesFilter: A set of source languages to filter descendants against.
67
+
/// - Returns: The references of each direct descendant that has a language representation in at least one of the given languages.
0 commit comments