Skip to content

Commit

Permalink
chore: Support Swift Compiler 6 (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdeem authored Sep 30, 2024
1 parent 64a7311 commit 179c886
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ struct SelectiveTestingPlugin: CommandPlugin {
}
#endif

extension String: LocalizedError {
extension String: @retroactive LocalizedError {
public var errorDescription: String? { return self }
}
4 changes: 4 additions & 0 deletions Sources/SelectiveTestShell/String+Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@

import Foundation

#if compiler(>=6)
extension String: @retroactive Error {}
#else
extension String: Error {}
#endif
4 changes: 4 additions & 0 deletions Sources/Workspace/XCWorkspace+Projects.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import Foundation
import PathKit
import XcodeProj

#if compiler(>=6)
extension String: @retroactive Error {}
#else
extension String: Error {}
#endif

extension XCWorkspace {
public func allProjects(basePath: Path) throws -> [(XcodeProj, Path)] {
Expand Down

0 comments on commit 179c886

Please sign in to comment.