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
Fix "missing technology root" warning for tutorials (#812)
Removes the "missing technology root" warning and adds a more specific one for tutorials without table of contents .
rdar://117866037
* - `formattedDiagnosticSource` allows addition of new content file into the diagnostic message.
- Replaced `org.swift.docc.MissingTechnologyRoot` diagnostic for `org.swift.docc.MissingTableOfContents`
* Make sure table of contents template file exists instead of force-unwrapping.
* Changed tutorial template root filename to a constant.
Fixed tests.
summary:"No TechnologyRoot to organize article-only documentation.",
492
-
explanation:"Article-only documentation needs a TechnologyRoot page (indicated by a `TechnologyRoot` directive within a `Metadata` directive) to define the root of the documentation hierarchy."
@Image(source: "chapter1-slothcreatorEssentials.png", alt: "A wireframe of an app interface that has an outline of a sloth and four buttons below the sloth. The buttons display the following symbols, from left to right: snowflake, fire, wind, and lightning.")
3119
+
3120
+
Create custom sloths and edit their attributes and powers using SlothCreator.
"No TechnologyRoot to organize article-only documentation.",
3132
3179
"No symbol matched 'ModuleThatDoesNotExist'. Can't resolve 'ModuleThatDoesNotExist'."
3133
-
])
3180
+
].sorted())
3134
3181
3135
3182
letlogLines= logStorage.text.splitByNewlines
3136
-
XCTAssertEqual(logLines.filter{($0 asNSString).contains("warning:")}.count,2,"There should be two warnings printed to the console")
3137
-
XCTAssertEqual(logLines.filter{($0 asNSString).contains("No TechnologyRoot to organize article-only documentation.")}.count,1,"The root page warning shouldn't be repeated.")
3138
-
XCTAssertEqual(logLines.filter{($0 asNSString).contains("No symbol matched 'ModuleThatDoesNotExist'. Can't resolve 'ModuleThatDoesNotExist'.")}.count,1,"The link warning shouldn't be repeated.")
3183
+
XCTAssertEqual(logLines.filter{ $0.hasPrefix("warning: No symbol matched 'ModuleThatDoesNotExist'. Can't resolve 'ModuleThatDoesNotExist'.")}.count,1)
0 commit comments