SwiftVersion
public struct SwiftVersion : RawRepresentable, Codable, VersionComparable, Sendable
A value describing the version of the Swift compiler.
-
Declaration
Swift
public typealias RawValue = String -
Declaration
Swift
public let rawValue: String -
Declaration
Swift
public init(rawValue: String) -
Swift 5
Declaration
Swift
static let five: SwiftVersion -
Swift 5.1
Declaration
Swift
static let fiveDotOne: SwiftVersion -
Swift 5.2
Declaration
Swift
static let fiveDotTwo: SwiftVersion -
Swift 5.3
Declaration
Swift
static let fiveDotThree: SwiftVersion -
Swift 5.4
Declaration
Swift
static let fiveDotFour: SwiftVersion -
Swift 5.5
Declaration
Swift
static let fiveDotFive: SwiftVersion -
Swift 5.6
Declaration
Swift
static let fiveDotSix: SwiftVersion -
Swift 5.7
Declaration
Swift
static let fiveDotSeven: SwiftVersion -
Swift 5.8
Declaration
Swift
static let fiveDotEight: SwiftVersion -
Swift 5.9
Declaration
Swift
static let fiveDotNine: SwiftVersion -
Swift 6
Declaration
Swift
static let six: SwiftVersion -
Swift 6.1
Declaration
Swift
static let sixDotOne: SwiftVersion -
Swift 6.1.1
Declaration
Swift
static let sixDotOneDotOne: SwiftVersion -
Swift 6.1.2
Declaration
Swift
static let sixDotOneDotTwo: SwiftVersion -
Swift 6.2
Declaration
Swift
static let sixDotTwo: SwiftVersion -
Swift 6.2.1
Declaration
Swift
static let sixDotTwoDotOne: SwiftVersion -
The current detected Swift compiler version, based on the currently accessible SourceKit version.
Note
Override by setting theSWIFTLINT_SWIFT_VERSIONenvironment variable.Declaration
Swift
static let current: SwiftVersion
View on GitHub
Install in Dash