Skip to content

Commit 6199304

Browse files
commented out usages of ByteBuffer due to "missing module CNIOAtomics" problem
1 parent bb5e2ea commit 6199304

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

Sources/HTMLKit/HTMLKit.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import struct Foundation.Data
1212
#endif
1313

1414

15-
#if canImport(NIOCore)
16-
import struct Foundation.ByteBuffer
17-
#endif
15+
/*#if canImport(NIOCore)
16+
import struct NIOCore.ByteBuffer
17+
#endif*/
1818

1919
// MARK: StaticString equality
2020
public extension StaticString {
@@ -48,10 +48,10 @@ public macro htmlUTF8CString<T: ExpressibleByStringLiteral>(attributes: [HTMLEle
4848
public macro htmlData<T: ExpressibleByStringLiteral>(attributes: [HTMLElementAttribute] = [], xmlns: T? = nil, _ innerHTML: T...) -> Data = #externalMacro(module: "HTMLKitMacros", type: "HTMLElement")
4949
#endif
5050

51-
#if canImport(NIOCore)
51+
/*#if canImport(NIOCore)
5252
@freestanding(expression)
5353
public macro htmlByteBuffer<T: ExpressibleByStringLiteral>(attributes: [HTMLElementAttribute] = [], xmlns: T? = nil, _ innerHTML: T...) -> ByteBuffer = #externalMacro(module: "HTMLKitMacros", type: "HTMLElement")
54-
#endif
54+
#endif*/
5555

5656
// MARK: Elements
5757

Sources/HTMLKitMacros/HTMLElement.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import HTMLKitUtilities
1414
import struct Foundation.Data
1515
#endif
1616

17-
#if canImport(NIOCore)
17+
/*#if canImport(NIOCore)
1818
import struct NIOCore.ByteBuffer
19-
#endif
19+
#endif*/
2020

2121
enum HTMLElement : ExpressionMacro {
2222
static func expansion(of node: some FreestandingMacroExpansionSyntax, in context: some MacroExpansionContext) throws -> ExprSyntax {
@@ -27,9 +27,9 @@ enum HTMLElement : ExpressionMacro {
2727
set.insert(.htmlData)
2828
#endif
2929

30-
#if canImport(NIOCore)
30+
/*#if canImport(NIOCore)
3131
set.insert(.htmlByteBuffer)
32-
#endif
32+
#endif*/
3333

3434
if set.contains(HTMLElementType(rawValue: node.macroName.text)) {
3535
let has_interpolation:Bool = !string.ranges(of: try! Regex("\\((.*)\\)")).isEmpty
@@ -53,10 +53,10 @@ enum HTMLElement : ExpressionMacro {
5353
return "Data(\(raw: bytes([UInt8](string.utf8))))"
5454
#endif
5555

56-
#if canImport(NIOCore)
56+
/*#if canImport(NIOCore)
5757
case .htmlByteBuffer:
5858
return "ByteBuffer(bytes: \(raw: bytes([UInt8](string.utf8))))"
59-
#endif
59+
#endif*/
6060

6161
default: break
6262
}
@@ -373,9 +373,9 @@ enum HTMLElementType : String, CaseIterable {
373373
case htmlData
374374
#endif
375375

376-
#if canImport(NIOCore)
376+
/*#if canImport(NIOCore)
377377
case htmlByteBuffer
378-
#endif
378+
#endif*/
379379

380380
case a
381381
case abbr

Tests/HTMLKitTests/HTMLKitTests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import HTMLKit
1212
import struct Foundation.Data
1313
#endif
1414

15-
#if canImport(NIOCore)
15+
/*#if canImport(NIOCore)
1616
import struct NIOCore.ByteBuffer
17-
#endif
17+
#endif*/
1818

1919
// MARK: Escaping HTML
2020
struct HTMLKitTests {
@@ -58,9 +58,9 @@ extension HTMLKitTests {
5858
#if canImport(Foundation)
5959
let _:Data = #htmlData("")
6060
#endif
61-
#if canImport(NIOCore)
61+
/*#if canImport(NIOCore)
6262
let _:ByteBuffer = #htmlByteBuffer("")
63-
#endif
63+
#endif*/
6464

6565
//let bro:String = ""
6666
//let _:[UInt8] = #htmlUTF8Bytes("\(bro)")
@@ -85,11 +85,11 @@ extension HTMLKitTests {
8585
#htmlData("")
8686
}
8787
#endif
88-
#if canImport(NIOCore)
88+
/*#if canImport(NIOCore)
8989
func representation6() -> ByteBuffer {
9090
#htmlByteBuffer("")
9191
}
92-
#endif
92+
#endif*/
9393
}
9494

9595
// MARK: Element tests

0 commit comments

Comments
 (0)