Skip to content

Commit dca4927

Browse files
committed
Remove ABI.Version.eventHandler(...) protocol requirement when the target does not support JSON event streaming.
1 parent 99ed4b3 commit dca4927

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/Testing/ABI/ABI.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ extension ABI {
2020
/// The numeric representation of this ABI version.
2121
static var versionNumber: Int { get }
2222

23+
#if canImport(Foundation) && (!SWT_NO_FILE_IO || !SWT_NO_ABI_ENTRY_POINT)
2324
/// Create an event handler that encodes events as JSON and forwards them to
2425
/// an ABI-friendly event handler.
2526
///
@@ -38,6 +39,7 @@ extension ABI {
3839
encodeAsJSONLines: Bool,
3940
forwardingTo eventHandler: @escaping @Sendable (_ recordJSON: UnsafeRawBufferPointer) -> Void
4041
) -> Event.Handler
42+
#endif
4143
}
4244

4345
/// The current supported ABI version (ignoring any experimental versions.)

0 commit comments

Comments
 (0)