Skip to content

Update for changes made in SE-0036 #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Sources/Get/Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ public enum Error: ErrorProtocol {
extension Error: CustomStringConvertible {
public var description: String {
switch self {
case InvalidDependencyGraph(let package):
case .InvalidDependencyGraph(let package):
return "The dependency graph could not be satisfied (\(package))"
case InvalidDependencyGraphMissingTag(let package, let requestedTag, let existingTags):
case .InvalidDependencyGraphMissingTag(let package, let requestedTag, let existingTags):
return "The dependency graph could not be satisfied. The package (\(package)) with version tag in range (\(requestedTag)) is not found. Found tags (\(existingTags))"
case UpdateRequired(let package):
case .UpdateRequired(let package):
return "The dependency graph could not be satisfied because an update to `\(package)' is required"
case .GitCloneFailure(let url, let dstdir):
return "Failed to clone \(url) to \(dstdir)"
case .Unversioned(let package):
return "No version tag found in (\(package)) package. Add a version tag with \"git tag\" command. Example: \"git tag 0.1.0\""
case NoManifest(let clonePath, let version):
case .NoManifest(let clonePath, let version):
return "The package at `\(clonePath)' has no Package.swift for the specific version: \(version)"
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Multitool/Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extension Error: CustomStringConvertible {
return "invalid or incomplete Swift toolchain:\n \(prefix)"
case .InvalidSwiftExec(let value):
return "invalid SWIFT_EXEC value: \(value)"
case BuildYAMLNotFound(let value):
case .BuildYAMLNotFound(let value):
return "no build YAML found: \(value)"
}
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/OptionsParser/Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ public enum Error: ErrorProtocol {
extension Error: CustomStringConvertible {
public var description: String {
switch self {
case ExpectedAssociatedValue(let arg):
case .ExpectedAssociatedValue(let arg):
return "expected associated value for argument: \(arg)"
case UnexpectedAssociatedValue(let arg, let value):
case .UnexpectedAssociatedValue(let arg, let value):
return "unexpected associated value for argument: \(arg)=\(value)"
case .MultipleModesSpecified(let modes):
return "multiple modes specified: \(modes)"
Expand Down
18 changes: 9 additions & 9 deletions Sources/POSIX/Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ extension SystemError: CustomStringConvertible {
return "popen error: \(strerror(errno))"
case .read(let errno):
return "read error: \(strerror(errno))"
case readdir(let errno, _):
case .readdir(let errno, _):
return "readdir error: \(strerror(errno))"
case readlink(let errno, let path):
case .readlink(let errno, let path):
return "readlink error: \(path), \(strerror(errno))"
case .realpath(let errno, let path):
return "realpath error: \(strerror(errno)): \(path)"
Expand All @@ -94,19 +94,19 @@ extension SystemError: CustomStringConvertible {
return "rmdir error: \(strerror(errno)): \(path)"
case .stat(let errno, _):
return "stat error: \(strerror(errno))"
case symlinkat(let errno, _):
case .symlinkat(let errno, _):
return "symlinkat error: \(strerror(errno))"
case unlink(let errno, let path):
case .unlink(let errno, let path):
return "unlink error: \(strerror(errno)): \(path)"
case waitpid(let errno):
case .waitpid(let errno):
return "waitpid error: \(strerror(errno))"
case time(let errno):
case .time(let errno):
return "time error: \(strerror(errno))"
case gmtime_r(let errno):
case .gmtime_r(let errno):
return "gmtime_r error: \(strerror(errno))"
case ctime_r(let errno):
case .ctime_r(let errno):
return "ctime_r error: \(strerror(errno))"
case strftime:
case .strftime:
return "strftime error."
}
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Utility/Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public enum Error: ErrorProtocol {
extension Error: CustomStringConvertible {
public var description: String {
switch self {
case ObsoleteGitVersion:
case .ObsoleteGitVersion:
return "Git 2.0 or higher is required. Please update git and retry."
case UnknownGitError:
case .UnknownGitError:
return "Failed to invoke git command. Please try updating git"
}
}
Expand Down
8 changes: 4 additions & 4 deletions Sources/swift-build/usage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ enum CleanMode: CustomStringConvertible {
private init(_ rawValue: String?) throws {
switch rawValue?.lowercased() {
case nil, "build"?:
self = Build
self = .Build
case "dist"?, "distribution"?:
self = Dist
self = .Dist
default:
throw OptionsParser.Error.InvalidUsage("invalid clean mode: \(rawValue)")
}
Expand All @@ -194,9 +194,9 @@ enum InitMode: CustomStringConvertible {
private init(_ rawValue: String?) throws {
switch rawValue?.lowercased() {
case "library"?, "lib"?:
self = Library
self = .Library
case nil, "executable"?, "exec"?, "exe"?:
self = Executable
self = .Executable
default:
throw OptionsParser.Error.InvalidUsage("invalid initialization mode: \(rawValue)")
}
Expand Down