mirror of
https://github.com/apple/swift-nio-imap
synced 2026-11-26 04:57:51 +00:00
The new byte types need `Span`-producing stdlib accessors (`Array.span`, `String.utf8Span`) that are gated at 26. Also adds `DequeModule`. Public break: raises the deployment floor to 26 on every platform (was macOS 15, iOS 18, tvOS 18, watchOS 11, visionOS 2). Examples follow, since a path dependency cannot have a higher floor than its dependent.
73 lines
3.2 KiB
Swift
73 lines
3.2 KiB
Swift
// swift-tools-version:6.2
|
|
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
|
// 6.2 to match the root package, which this example depends on by path.
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "imap-tool-example",
|
|
platforms: [
|
|
// Matches the library, which pins macOS 26 for the stdlib accessors that produce a `Span`.
|
|
.macOS(.v26)
|
|
],
|
|
products: [
|
|
.library(name: "IMAPToolLib", targets: ["IMAPToolLib"]),
|
|
.executable(name: "imap-tool", targets: ["IMAPTool"]),
|
|
],
|
|
dependencies: [
|
|
.package(name: "swift-nio-imap", path: "../.."),
|
|
.package(url: "https://github.com/apple/swift-argument-parser", .upToNextMinor(from: "1.7.0")),
|
|
.package(url: "https://github.com/apple/swift-async-algorithms", from: "1.1.0"),
|
|
.package(url: "https://github.com/apple/swift-collections", "1.4.0"..<"2.0.0"),
|
|
.package(url: "https://github.com/apple/swift-nio", from: "2.64.0"),
|
|
.package(url: "https://github.com/apple/swift-system", from: "1.6.0"),
|
|
.package(url: "https://github.com/apple/swift-numerics", from: "1.0.0"),
|
|
],
|
|
targets: [
|
|
.target(
|
|
name: "IMAPToolLib",
|
|
dependencies: [
|
|
.product(name: "NIOIMAP", package: "swift-nio-imap"),
|
|
.product(name: "IMAPCommands", package: "swift-nio-imap"),
|
|
.product(name: "ArgumentParser", package: "swift-argument-parser"),
|
|
.product(name: "AsyncAlgorithms", package: "swift-async-algorithms"),
|
|
.product(name: "SystemPackage", package: "swift-system"),
|
|
.product(name: "NIO", package: "swift-nio"),
|
|
.product(name: "_NIOFileSystem", package: "swift-nio"),
|
|
.product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
|
|
.product(name: "OrderedCollections", package: "swift-collections"),
|
|
.product(name: "DequeModule", package: "swift-collections"),
|
|
],
|
|
swiftSettings: [
|
|
// `IMAPCommands`' closure-taking APIs are caller-isolated, and so are this
|
|
// library's operations that wrap them.
|
|
.enableUpcomingFeature("NonisolatedNonsendingByDefault")
|
|
]
|
|
),
|
|
.executableTarget(
|
|
name: "IMAPTool",
|
|
dependencies: [
|
|
.target(name: "IMAPToolLib"),
|
|
.product(name: "ArgumentParser", package: "swift-argument-parser"),
|
|
],
|
|
swiftSettings: [
|
|
.enableUpcomingFeature("NonisolatedNonsendingByDefault")
|
|
]
|
|
),
|
|
.testTarget(
|
|
name: "IMAPToolLibTests",
|
|
dependencies: [
|
|
.target(name: "IMAPToolLib"),
|
|
.product(name: "IMAPCommands", package: "swift-nio-imap"),
|
|
.product(name: "NIOIMAP", package: "swift-nio-imap"),
|
|
.product(name: "NIO", package: "swift-nio"),
|
|
.product(name: "Numerics", package: "swift-numerics"),
|
|
.product(name: "SystemPackage", package: "swift-system"),
|
|
],
|
|
swiftSettings: [
|
|
.enableUpcomingFeature("NonisolatedNonsendingByDefault")
|
|
]
|
|
),
|
|
]
|
|
)
|