LeastSignificantVersion
The least significant version to round to.
enum LeastSignificantVersion
The least significant version to round to.
enum LeastSignificantVersion
import PackageModel
struct ToolsVersion
Tools version represents version of the Swift toolchain.
case automatic
The patch version is the least significant if and only if it’s not zero. Otherwise, the minor version is the least significant.
case minor
The minor version is the least significant.
case patch
The patch version is the least significant.
init(from decoder: any Decoder) throws
init?(string: String)
Create an instance of tools version from a given string.
init(version: Version)
Create instance of tools version from a given version.
static let current: ToolsVersion
The current tools version in use.
static let minimumRequired: ToolsVersion
The minimum tools version that is required by the package manager.
static let v3: ToolsVersion
static let v4: ToolsVersion
static let v4_2: ToolsVersion
static let v5: ToolsVersion
static let v5_10: ToolsVersion
static let v5_2: ToolsVersion
static let v5_3: ToolsVersion
static let v5_4: ToolsVersion
static let v5_5: ToolsVersion
static let v5_6: ToolsVersion
static let v5_7: ToolsVersion
static let v5_8: ToolsVersion
static let v5_9: ToolsVersion
static let v6_0: ToolsVersion
static let vNext: ToolsVersion
var description: String { get }
var major: Int { get }
The major version number.
var minor: Int { get }
The minor version number.
var patch: Int { get }
The patch version number.
var runtimeSubpath: RelativePath { get }
The subpath to the PackageDescription runtime library.
var swiftLanguageVersion: SwiftLanguageVersion { get }
The swift language version based on this tools version.
var versionSpecificKeys: [String] { get }
The list of version specific identifiers to search when attempting to load version specific package or version information, in order of preference.
var zeroedPatch: ToolsVersion { get }
Returns the tools version with zeroed patch number.
static func < (lhs: ToolsVersion, rhs: ToolsVersion) -> Bool
func specification(roundedTo leastSignificantVersion: LeastSignificantVersion = .automatic) -> String
Returns a Swift tools version specification specifying the version to the given precision.
func validateToolsVersion(_ currentToolsVersion: ToolsVersion) -> Bool
Returns true if the tools version is valid and can be used by this version of the package manager.
func validateToolsVersion(_ currentToolsVersion: ToolsVersion, packageIdentity: PackageIdentity, packageVersion: String? = .none) throws
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.