diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6306b873b..85da972ea 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: strategy: fail-fast: false matrix: - xcode: ["16.1", "16.0", "15.4", "15.2"] + xcode: ["16.1", "16.0", "15.4"] include: - xcode: "16.1" macos: macos-15 @@ -41,8 +41,6 @@ jobs: macos: macos-15 - xcode: "15.4" macos: macos-14 - - xcode: "15.2" - macos: macos-14 runs-on: ${{ matrix.macos }} name: macOS steps: @@ -77,14 +75,12 @@ jobs: strategy: fail-fast: false matrix: - swift: ["6.0", "5.10", "5.9"] + swift: ["6.0", "5.10"] include: - swift: "6.0" container: "swift:6.0" - swift: "5.10" container: "swift:5.10" - - swift: "5.9" - container: "swift:5.9" runs-on: ubuntu-20.04 container: ${{ matrix.container }} name: Linux diff --git a/CHANGELOG.md b/CHANGELOG.md index 965f0c7d9..37c2ed261 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ##### Breaking - Support for installing via CocoaPods has been removed. +- Removed support for Swift 5.9/Xcode 15.2. ##### Enhancements diff --git a/Package.swift b/Package.swift index bc8891520..2b8ff4f3e 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.9 +// swift-tools-version:5.10 import PackageDescription var dependencies: [Package.Dependency] = [ diff --git a/Sources/BUILD.bazel b/Sources/BUILD.bazel index 0ffe0c6d2..4c3797712 100644 --- a/Sources/BUILD.bazel +++ b/Sources/BUILD.bazel @@ -57,7 +57,6 @@ swift_library( "SourceGraph/Mutators/AncestralReferenceEliminator.swift", "SourceGraph/Mutators/AssetReferenceRetainer.swift", "SourceGraph/Mutators/AssignOnlyPropertyReferenceEliminator.swift", - "SourceGraph/Mutators/CapitalSelfFunctionCallRetainer.swift", "SourceGraph/Mutators/CodablePropertyRetainer.swift", "SourceGraph/Mutators/CodingKeyEnumReferenceBuilder.swift", "SourceGraph/Mutators/ComplexPropertyAccessorReferenceBuilder.swift", diff --git a/Sources/Shared/SwiftVersion.swift b/Sources/Shared/SwiftVersion.swift index 974502cb1..4a4210fb4 100644 --- a/Sources/Shared/SwiftVersion.swift +++ b/Sources/Shared/SwiftVersion.swift @@ -2,7 +2,7 @@ import Extensions import Foundation public struct SwiftVersion { - static let minimumVersion = "5.9" + static let minimumVersion = "5.10" public let version: VersionString public let fullVersion: String diff --git a/Sources/SourceGraph/Mutators/CapitalSelfFunctionCallRetainer.swift b/Sources/SourceGraph/Mutators/CapitalSelfFunctionCallRetainer.swift deleted file mode 100644 index 638b9faa9..000000000 --- a/Sources/SourceGraph/Mutators/CapitalSelfFunctionCallRetainer.swift +++ /dev/null @@ -1,28 +0,0 @@ -import Configuration -import Foundation -import Shared - -/// Retains all constructors on types instantiated via `Self(...)` to workaround false positives caused by a bug in Swift. -/// https://github.com/apple/swift/issues/64686 -/// https://github.com/peripheryapp/periphery/issues/264 -final class CapitalSelfFunctionCallRetainer: SourceGraphMutator { - private let graph: SourceGraph - private let swiftVersion: SwiftVersion - - required init(graph: SourceGraph, configuration _: Configuration, swiftVersion: SwiftVersion) { - self.graph = graph - self.swiftVersion = swiftVersion - } - - func mutate() { - guard swiftVersion.version.isVersion(lessThan: "5.9") else { return } - - for decl in graph.declarations(ofKinds: [.struct, .class]) { - guard decl.hasCapitalSelfFunctionCall else { continue } - decl.declarations - .lazy - .filter { $0.kind == .functionConstructor } - .forEach { graph.markRetained($0) } - } - } -} diff --git a/Sources/SourceGraph/SourceGraphMutatorRunner.swift b/Sources/SourceGraph/SourceGraphMutatorRunner.swift index e9090c65f..f67ddeb58 100644 --- a/Sources/SourceGraph/SourceGraphMutatorRunner.swift +++ b/Sources/SourceGraph/SourceGraphMutatorRunner.swift @@ -40,7 +40,6 @@ public final class SourceGraphMutatorRunner { StringInterpolationAppendInterpolationRetainer.self, PropertyWrapperRetainer.self, ResultBuilderRetainer.self, - CapitalSelfFunctionCallRetainer.self, CodablePropertyRetainer.self, ExternalOverrideRetainer.self, diff --git a/Tests/AccessibilityTests/AccessibilityProject/Package.swift b/Tests/AccessibilityTests/AccessibilityProject/Package.swift index 3ec209552..3cd569cd3 100644 --- a/Tests/AccessibilityTests/AccessibilityProject/Package.swift +++ b/Tests/AccessibilityTests/AccessibilityProject/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.9 +// swift-tools-version:5.10 import PackageDescription let package = Package( diff --git a/Tests/Fixtures/Package.swift b/Tests/Fixtures/Package.swift index 48b28fe78..56a9d9106 100644 --- a/Tests/Fixtures/Package.swift +++ b/Tests/Fixtures/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.9 +// swift-tools-version:5.10 import PackageDescription var targets: [PackageDescription.Target] = [ diff --git a/Tests/SPMTests/SPMProject/Package.swift b/Tests/SPMTests/SPMProject/Package.swift index b0a76063f..c6260cca7 100644 --- a/Tests/SPMTests/SPMProject/Package.swift +++ b/Tests/SPMTests/SPMProject/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.9 +// swift-tools-version:5.10 import PackageDescription let package = Package( diff --git a/Tests/XcodeTests/UIKitProject/LocalPackages/LocalPackage/Package.swift b/Tests/XcodeTests/UIKitProject/LocalPackages/LocalPackage/Package.swift index ef0cd7620..3ee3878a6 100644 --- a/Tests/XcodeTests/UIKitProject/LocalPackages/LocalPackage/Package.swift +++ b/Tests/XcodeTests/UIKitProject/LocalPackages/LocalPackage/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.9 +// swift-tools-version: 5.10 import PackageDescription let package = Package(