From 27b4d6e98ec2e429e7950b1fd28b186df58881d6 Mon Sep 17 00:00:00 2001 From: Adam Fowler Date: Fri, 22 Dec 2023 16:28:07 +0100 Subject: [PATCH] @_documentation(visibility) only work in swift 5.8 or later --- Sources/Hummingbird/Exports.swift | 14 ++++++++++++++ Sources/HummingbirdJobs/Exports.swift | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/Sources/Hummingbird/Exports.swift b/Sources/Hummingbird/Exports.swift index 8ff328eb2..ae5d586c4 100644 --- a/Sources/Hummingbird/Exports.swift +++ b/Sources/Hummingbird/Exports.swift @@ -24,6 +24,7 @@ @_exported import struct HummingbirdCore.TSTLSOptions #endif +#if swift(>=5.8) @_exported @_documentation(visibility: internal) import struct NIOCore.ByteBuffer @_exported @_documentation(visibility: internal) import struct NIOCore.ByteBufferAllocator @_exported @_documentation(visibility: internal) import protocol NIOCore.EventLoop @@ -35,3 +36,16 @@ @_exported @_documentation(visibility: internal) import struct NIOHTTP1.HTTPHeaders @_exported @_documentation(visibility: internal) import enum NIOHTTP1.HTTPMethod @_exported @_documentation(visibility: internal) import enum NIOHTTP1.HTTPResponseStatus +#else +@_exported import struct NIOCore.ByteBuffer +@_exported import struct NIOCore.ByteBufferAllocator +@_exported import protocol NIOCore.EventLoop +@_exported import class NIOCore.EventLoopFuture +@_exported import protocol NIOCore.EventLoopGroup +@_exported import enum NIOCore.SocketAddress +@_exported import struct NIOCore.TimeAmount + +@_exported import struct NIOHTTP1.HTTPHeaders +@_exported import enum NIOHTTP1.HTTPMethod +@_exported import enum NIOHTTP1.HTTPResponseStatus +#endif diff --git a/Sources/HummingbirdJobs/Exports.swift b/Sources/HummingbirdJobs/Exports.swift index e0b216ce1..c2bc9005d 100644 --- a/Sources/HummingbirdJobs/Exports.swift +++ b/Sources/HummingbirdJobs/Exports.swift @@ -12,4 +12,8 @@ // //===----------------------------------------------------------------------===// +#if swift(>=5.8) @_exported @_documentation(visibility: internal) import struct Logging.Logger +#else +@_exported import struct Logging.Logger +#endif