Skip to content

Commit 7dd32d9

Browse files
committed
Update how FoundationXML is imported
1 parent f5f2923 commit 7dd32d9

16 files changed

+59
-15
lines changed

Sources/DocCHTML/MarkdownRenderer.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
*/
1010

11+
#if canImport(FoundationXML)
12+
// FIXME: See if we can avoid depending on XMLNode/XMLParser to avoid needing to import FoundationXML
13+
package import FoundationXML
14+
package import FoundationEssentials
15+
#else
1116
package import Foundation
17+
#endif
1218
package import Markdown
1319

1420
/// The primary goal for the rendered HTML output.

Sources/DocCHTML/MarkupRenderer+Availability.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
*/
1010

11-
package import Foundation
1211
#if canImport(FoundationXML)
1312
// FIXME: See if we can avoid depending on XMLNode/XMLParser to avoid needing to import FoundationXML
1413
package import FoundationXML
14+
#else
15+
package import Foundation
1516
#endif
1617

1718
package extension MarkdownRenderer {

Sources/DocCHTML/MarkupRenderer+Breadcrumbs.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
*/
1010

11-
package import Foundation
1211
#if canImport(FoundationXML)
1312
// FIXME: See if we can avoid depending on XMLNode/XMLParser to avoid needing to import FoundationXML
1413
package import FoundationXML
14+
package import FoundationEssentials
15+
#else
16+
package import Foundation
1517
#endif
1618

1719
package extension MarkdownRenderer {

Sources/DocCHTML/MarkupRenderer+Declaration.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
*/
1010

11-
package import Foundation
1211
#if canImport(FoundationXML)
1312
// FIXME: See if we can avoid depending on XMLNode/XMLParser to avoid needing to import FoundationXML
1413
package import FoundationXML
14+
#else
15+
package import Foundation
1516
#endif
1617

1718
package import DocCCommon

Sources/DocCHTML/MarkupRenderer+Parameters.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
*/
1010

11-
package import Foundation
1211
#if canImport(FoundationXML)
1312
// FIXME: See if we can avoid depending on XMLNode/XMLParser to avoid needing to import FoundationXML
1413
package import FoundationXML
14+
#else
15+
package import Foundation
1516
#endif
1617

1718
package import Markdown

Sources/DocCHTML/MarkupRenderer+Returns.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
*/
1010

11-
package import Foundation
1211
#if canImport(FoundationXML)
1312
// FIXME: See if we can avoid depending on XMLNode/XMLParser to avoid needing to import FoundationXML
1413
package import FoundationXML
14+
package import FoundationEssentials
15+
#else
16+
package import Foundation
1517
#endif
1618

1719
package import Markdown

Sources/DocCHTML/MarkupRenderer+Topics.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
*/
1010

11-
package import Foundation
1211
#if canImport(FoundationXML)
1312
// FIXME: See if we can avoid depending on XMLNode/XMLParser to avoid needing to import FoundationXML
1413
package import FoundationXML
14+
package import FoundationEssentials
15+
#else
16+
package import Foundation
1517
#endif
1618

1719
package import Markdown

Sources/DocCHTML/WordBreak.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
*/
1010

11-
package import Foundation
1211
#if canImport(FoundationXML)
1312
// FIXME: See if we can avoid depending on XMLNode/XMLParser to avoid needing to import FoundationXML
1413
package import FoundationXML
14+
#else
15+
package import Foundation
1516
#endif
1617

1718
package import DocCCommon

Sources/DocCHTML/XMLNode+element.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
*/
1010

11-
package import Foundation
1211
#if canImport(FoundationXML)
1312
// FIXME: See if we can avoid depending on XMLNode/XMLParser to avoid needing to import FoundationXML
1413
package import FoundationXML
14+
#else
15+
package import Foundation
1516
#endif
1617

1718
extension XMLNode {

Sources/SwiftDocC/Infrastructure/ConvertOutputConsumer.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
99
*/
1010

11-
public import Foundation
12-
1311
/// A consumer for output produced by a documentation conversion.
1412
///
1513
/// Types that conform to this protocol manage what to do with documentation conversion products, for example persist them to disk
@@ -58,7 +56,6 @@ public extension ConvertOutputConsumer {
5856
func consume(renderReferenceStore: RenderReferenceStore) throws {}
5957
func consume(buildMetadata: BuildMetadata) throws {}
6058
func consume(linkResolutionInformation: SerializableLinkResolutionInformation) throws {}
61-
func consume(page: XMLNode, for reference: ResolvedTopicReference) throws {}
6259
}
6360

6461
// Default implementation so that conforming types don't need to implement deprecated API.

0 commit comments

Comments
 (0)