@@ -136,10 +136,15 @@ public class DocumentationContext: DocumentationContextDataProviderDelegate {
136136 /// The set of all manually curated references if `shouldStoreManuallyCuratedReferences` was true at the time of processing and has remained `true` since.. Nil if curation has not been processed yet.
137137 public private( set) var manuallyCuratedReferences : Set < ResolvedTopicReference > ?
138138
139- /// The root technology nodes of the Topic Graph.
139+ @ available ( * , deprecated , renamed : " tutorialTableOfContentsReferences " , message : " Use 'tutorialTableOfContentsReferences' This deprecated API will be removed after 6.2 is released " )
140140 public var rootTechnologies : [ ResolvedTopicReference ] {
141+ tutorialTableOfContentsReferences
142+ }
143+
144+ /// The tutorial table-of-contents nodes in the topic graph.
145+ public var tutorialTableOfContentsReferences : [ ResolvedTopicReference ] {
141146 return topicGraph. nodes. values. compactMap { node in
142- guard node. kind == . technology && parents ( of: node. reference) . isEmpty else {
147+ guard node. kind == . tutorialTableOfContents && parents ( of: node. reference) . isEmpty else {
143148 return nil
144149 }
145150 return node. reference
@@ -606,65 +611,65 @@ public class DocumentationContext: DocumentationContextDataProviderDelegate {
606611 /// up in the context, not from the arrays that was passed as arguments.
607612 ///
608613 /// - Parameters:
609- /// - technologies : The list of temporary 'technology ' pages.
614+ /// - tutorialTableOfContentsResults : The list of temporary 'tutorial table-of-contents ' pages.
610615 /// - tutorials: The list of temporary 'tutorial' pages.
611616 /// - tutorialArticles: The list of temporary 'tutorialArticle' pages.
612617 /// - bundle: The bundle to resolve links against.
613- private func resolveLinks( technologies: [ SemanticResult < Technology > ] ,
614- tutorials: [ SemanticResult < Tutorial > ] ,
615- tutorialArticles: [ SemanticResult < TutorialArticle > ] ,
616- bundle: DocumentationBundle ) {
617-
618+ private func resolveLinks(
619+ tutorialTableOfContents tutorialTableOfContentsResults: [ SemanticResult < TutorialTableOfContents > ] ,
620+ tutorials: [ SemanticResult < Tutorial > ] ,
621+ tutorialArticles: [ SemanticResult < TutorialArticle > ] ,
622+ bundle: DocumentationBundle
623+ ) {
618624 let sourceLanguages = soleRootModuleReference. map { self . sourceLanguages ( for: $0) } ?? [ . swift]
619625
620- // Technologies
621-
622- for technologyResult in technologies {
626+ // Tutorial table-of-contents
627+
628+ for tableOfContentsResult in tutorialTableOfContentsResults {
623629 autoreleasepool {
624- let url = technologyResult. source
625- let unresolvedTechnology = technologyResult. value
630+ let url = tableOfContentsResult. source
626631 var resolver = ReferenceResolver ( context: self , bundle: bundle)
627- let technology = resolver. visit ( unresolvedTechnology ) as! Technology
632+ let tableOfContents = resolver. visit ( tableOfContentsResult . value ) as! TutorialTableOfContents
628633 diagnosticEngine. emit ( resolver. problems)
629634
630635 // Add to document map
631- documentLocationMap [ url] = technologyResult. topicGraphNode. reference
632-
633- let technologyReference = technologyResult. topicGraphNode. reference. withSourceLanguages ( sourceLanguages)
636+ documentLocationMap [ url] = tableOfContentsResult. topicGraphNode. reference
634637
635- let technologyNode = DocumentationNode (
636- reference: technologyReference,
637- kind: . technology,
638+ let tableOfContentsReference = tableOfContentsResult. topicGraphNode. reference. withSourceLanguages ( sourceLanguages)
639+
640+ let tutorialTableOfContentsNode = DocumentationNode (
641+ reference: tableOfContentsReference,
642+ kind: . tutorialTableOfContents,
638643 sourceLanguage: Self . defaultLanguage ( in: sourceLanguages) ,
639644 availableSourceLanguages: sourceLanguages,
640- name: . conceptual( title: technology . intro. title) ,
641- markup: technology . originalMarkup,
642- semantic: technology
645+ name: . conceptual( title: tableOfContents . intro. title) ,
646+ markup: tableOfContents . originalMarkup,
647+ semantic: tableOfContents
643648 )
644- documentationCache [ technologyReference ] = technologyNode
649+ documentationCache [ tableOfContentsReference ] = tutorialTableOfContentsNode
645650
646- // Update the reference in the topic graph with the technology 's available languages.
651+ // Update the reference in the topic graph with the table-of-contents page 's available languages.
647652 topicGraph. updateReference (
648- technologyResult . topicGraphNode. reference,
649- newReference: technologyReference
653+ tableOfContentsResult . topicGraphNode. reference,
654+ newReference: tableOfContentsReference
650655 )
651656
652657 let anonymousVolumeName = " $volume "
653658
654- for volume in technology . volumes {
659+ for volume in tableOfContents . volumes {
655660 // Graph node: Volume
656- let volumeReference = technologyNode . reference. appendingPath ( volume. name ?? anonymousVolumeName)
661+ let volumeReference = tutorialTableOfContentsNode . reference. appendingPath ( volume. name ?? anonymousVolumeName)
657662 let volumeNode = TopicGraph . Node ( reference: volumeReference, kind: . volume, source: . file( url: url) , title: volume. name ?? anonymousVolumeName)
658663 topicGraph. addNode ( volumeNode)
659664
660- // Graph edge: Technology -> Volume
661- topicGraph. addEdge ( from: technologyResult . topicGraphNode, to: volumeNode)
665+ // Graph edge: Tutorial table-of-contents -> Volume
666+ topicGraph. addEdge ( from: tableOfContentsResult . topicGraphNode, to: volumeNode)
662667
663668 for chapter in volume. chapters {
664669 // Graph node: Module
665670 let baseNodeReference : ResolvedTopicReference
666671 if volume. name == nil {
667- baseNodeReference = technologyNode . reference
672+ baseNodeReference = tutorialTableOfContentsNode . reference
668673 } else {
669674 baseNodeReference = volumeNode. reference
670675 }
@@ -761,15 +766,15 @@ public class DocumentationContext: DocumentationContextDataProviderDelegate {
761766 }
762767
763768 private func registerDocuments( from bundle: DocumentationBundle ) throws -> (
764- technologies : [ SemanticResult < Technology > ] ,
769+ tutorialTableOfContentsResults : [ SemanticResult < TutorialTableOfContents > ] ,
765770 tutorials: [ SemanticResult < Tutorial > ] ,
766771 tutorialArticles: [ SemanticResult < TutorialArticle > ] ,
767772 articles: [ SemanticResult < Article > ] ,
768773 documentationExtensions: [ SemanticResult < Article > ]
769774 ) {
770775 // First, try to understand the basic structure of the document by
771776 // analyzing it and putting references in as "unresolved".
772- var technologies = [ SemanticResult < Technology > ] ( )
777+ var tutorialTableOfContentsResults = [ SemanticResult < TutorialTableOfContents > ] ( )
773778 var tutorials = [ SemanticResult < Tutorial > ] ( )
774779 var tutorialArticles = [ SemanticResult < TutorialArticle > ] ( )
775780 var articles = [ SemanticResult < Article > ] ( )
@@ -857,11 +862,11 @@ public class DocumentationContext: DocumentationContextDataProviderDelegate {
857862 Add all topic graph nodes up front before resolution starts, because
858863 there may be circular linking.
859864 */
860- if let technology = analyzed as? Technology {
861- let topicGraphNode = TopicGraph . Node ( reference: reference, kind: . technology , source: . file( url: url) , title: technology . intro. title)
865+ if let tableOfContents = analyzed as? TutorialTableOfContents {
866+ let topicGraphNode = TopicGraph . Node ( reference: reference, kind: . tutorialTableOfContents , source: . file( url: url) , title: tableOfContents . intro. title)
862867 topicGraph. addNode ( topicGraphNode)
863- let result = SemanticResult ( value: technology , source: url, topicGraphNode: topicGraphNode)
864- technologies . append ( result)
868+ let result = SemanticResult ( value: tableOfContents , source: url, topicGraphNode: topicGraphNode)
869+ tutorialTableOfContentsResults . append ( result)
865870 } else if let tutorial = analyzed as? Tutorial {
866871 let topicGraphNode = TopicGraph . Node ( reference: reference, kind: . tutorial, source: . file( url: url) , title: tutorial. title ?? " " )
867872 topicGraph. addNode ( topicGraphNode)
@@ -920,7 +925,7 @@ public class DocumentationContext: DocumentationContextDataProviderDelegate {
920925 }
921926 }
922927
923- return ( technologies , tutorials, tutorialArticles, articles, documentationExtensions)
928+ return ( tutorialTableOfContentsResults , tutorials, tutorialArticles, articles, documentationExtensions)
924929 }
925930
926931 private func insertLandmarks( _ landmarks: some Sequence < Landmark > , from topicGraphNode: TopicGraph . Node , source url: URL ) {
@@ -2098,7 +2103,7 @@ public class DocumentationContext: DocumentationContextDataProviderDelegate {
20982103 // symbols or attempt to resolve links/references since the topic graph may not contain all documents
20992104 // or all symbols yet.
21002105 var result : (
2101- technologies : [ SemanticResult < Technology > ] ,
2106+ tutorialTableOfContentsResults : [ SemanticResult < TutorialTableOfContents > ] ,
21022107 tutorials: [ SemanticResult < Tutorial > ] ,
21032108 tutorialArticles: [ SemanticResult < TutorialArticle > ] ,
21042109 articles: [ SemanticResult < Article > ] ,
@@ -2137,7 +2142,7 @@ public class DocumentationContext: DocumentationContextDataProviderDelegate {
21372142 }
21382143
21392144 // All discovery went well, process the inputs.
2140- let ( technologies , tutorials, tutorialArticles, allArticles, documentationExtensions) = result
2145+ let ( tutorialTableOfContentsResults , tutorials, tutorialArticles, allArticles, documentationExtensions) = result
21412146 var ( otherArticles, rootPageArticles) = splitArticles ( allArticles)
21422147
21432148 let globalOptions = ( allArticles + documentationExtensions) . compactMap { article in
@@ -2185,8 +2190,8 @@ public class DocumentationContext: DocumentationContextDataProviderDelegate {
21852190 for article in tutorialArticles {
21862191 hierarchyBasedResolver. addTutorialArticle ( article)
21872192 }
2188- for technology in technologies {
2189- hierarchyBasedResolver. addTechnology ( technology )
2193+ for tutorialTableOfContents in tutorialTableOfContentsResults {
2194+ hierarchyBasedResolver. addTutorialTableOfContents ( tutorialTableOfContents )
21902195 }
21912196
21922197 registerRootPages ( from: rootPageArticles, in: bundle)
@@ -2221,13 +2226,13 @@ public class DocumentationContext: DocumentationContextDataProviderDelegate {
22212226
22222227 // Third, any processing that relies on resolving other content is done, mainly resolving links.
22232228 preResolveExternalLinks ( semanticObjects:
2224- technologies . map ( referencedSemanticObject) +
2229+ tutorialTableOfContentsResults . map ( referencedSemanticObject) +
22252230 tutorials. map ( referencedSemanticObject) +
22262231 tutorialArticles. map ( referencedSemanticObject) ,
22272232 localBundleID: bundle. identifier)
22282233
22292234 resolveLinks (
2230- technologies : technologies ,
2235+ tutorialTableOfContents : tutorialTableOfContentsResults ,
22312236 tutorials: tutorials,
22322237 tutorialArticles: tutorialArticles,
22332238 bundle: bundle
@@ -2913,8 +2918,8 @@ public class DocumentationContext: DocumentationContextDataProviderDelegate {
29132918extension DocumentationContext {
29142919
29152920 /// The nodes that are allowed to be roots in the topic graph.
2916- static var allowedRootNodeKinds : [ DocumentationNode . Kind ] = [ . technology , . module]
2917-
2921+ static var allowedRootNodeKinds : [ DocumentationNode . Kind ] = [ . tutorialTableOfContents , . module]
2922+
29182923 func analyzeTopicGraph( ) {
29192924 // Find all nodes that are loose in the graph and have no parent but aren't supposed to
29202925 let unexpectedRoots = topicGraph. nodes. values. filter { node in
0 commit comments