Skip to content

Commit

Permalink
@_documentation(visibility) only work in swift 5.8 or later
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Dec 22, 2023
1 parent 39e7f7b commit 27b4d6e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Sources/Hummingbird/Exports.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 4 additions & 0 deletions Sources/HummingbirdJobs/Exports.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@
//
//===----------------------------------------------------------------------===//

#if swift(>=5.8)
@_exported @_documentation(visibility: internal) import struct Logging.Logger
#else
@_exported import struct Logging.Logger
#endif

0 comments on commit 27b4d6e

Please sign in to comment.