Skip to content

Commit 69d4190

Browse files
committed
Update how FoundationXML is imported
1 parent f5f2923 commit 69d4190

10 files changed

+21
-10
lines changed

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: 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+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: 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+Topics.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/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/Model/Rendering/HTML/HTMLContentConsumer.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
/// A consumer for HTML content produced during documentation conversion.

Sources/SwiftDocC/Model/Rendering/HTML/HTMLRenderer.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-
import Foundation
1211
#if canImport(FoundationXML)
1312
// FIXME: See if we can avoid depending on XMLNode/XMLParser to avoid needing to import FoundationXML
1413
import FoundationXML
14+
import FoundationEssentials
15+
#else
16+
import Foundation
1517
#endif
1618
import DocCHTML
1719
import Markdown

0 commit comments

Comments
 (0)