Drop Swift 5.9 and 5.10 support (#383)

Make Swift 6.0 the minimum support version.

### Motivation:

`swift-log` supports 3 latest Swift releases, which is at this point
6.0, 6.1 and 6.2. Swift 5 is no longer supported.

### Modifications:

- Package.swift swift tools
- CI configs
- Imports checking if compiler is <6.0

### Result:

Swift 5 is no longer supported.

Co-authored-by: Honza Dvorsky <honza@apple.com>
This commit is contained in:
Vladimir KukushkinandHonza Dvorsky authored and GitHub committed 2025-10-23 09:22:00 +01:00
1 parent bd44c73045
commit 2a4139ef2a
7 files changed
+4 -26

No files matched your search

-2
View File
@@ -14,8 +14,6 @@ jobs:
name: Unit tests
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
linux_6_1_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
linux_6_2_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
-2
View File
@@ -18,8 +18,6 @@ jobs:
name: Unit tests
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
with:
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
linux_6_1_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
linux_6_2_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
+1 -1
View File
@@ -1,4 +1,4 @@
// swift-tools-version:5.9
// swift-tools-version:6.0
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift Logging API open source project
-4
View File
@@ -17,11 +17,7 @@ import Darwin
#elseif os(Windows)
import CRT
#elseif canImport(Glibc)
#if compiler(>=6.0)
@preconcurrency import Glibc
#else
import Glibc
#endif
#elseif canImport(Android)
import Android
#elseif canImport(Musl)
+1 -6
View File
@@ -12,16 +12,11 @@
//
//===----------------------------------------------------------------------===//
import Dispatch
import XCTest
@testable import Logging
#if compiler(>=6.0) || canImport(Darwin)
import Dispatch
#else
@preconcurrency import Dispatch
#endif
class GlobalLoggerTest: XCTestCase {
func test1() throws {
// bootstrap with our test logging impl
+1 -6
View File
@@ -12,16 +12,11 @@
//
//===----------------------------------------------------------------------===//
import Dispatch
import XCTest
@testable import Logging
#if compiler(>=6.0) || canImport(Darwin)
import Dispatch
#else
@preconcurrency import Dispatch
#endif
class LocalLoggerTest: XCTestCase {
func test1() throws {
// bootstrap with our test logging impl
+1 -5
View File
@@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//
import Dispatch
import Foundation
import XCTest
@@ -20,11 +21,6 @@ import XCTest
#if os(Windows)
import WinSDK
#endif
#if compiler(>=6.0) || canImport(Darwin)
import Dispatch
#else
@preconcurrency import Dispatch
#endif
internal struct TestLogging {
private let _config = Config() // shared among loggers