Skip to content

Extend the availability annotations for the Netrc support to cover all the Darwin platforms #218

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
Jun 9, 2021
Merged
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
10 changes: 5 additions & 5 deletions Sources/TSCUtility/Netrc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ extension AuthorizationProviding {

/*
Netrc feature depends upon `NSTextCheckingResult.range(withName name: String) -> NSRange`,
which is only available in macOS 10.13+ at this time.
which is only available in macOS 10.13+, iOS 11+, etc at this time.
*/
@available (OSX 10.13, *)
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
/// Container of parsed netrc connection settings
public struct Netrc: AuthorizationProviding {
/// Representation of `machine` connection settings & `default` connection settings.
Expand Down Expand Up @@ -88,7 +88,7 @@ public struct Netrc: AuthorizationProviding {
}
}

@available (OSX 10.13, *)
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
public extension Netrc {
enum Error: Swift.Error {
case invalidFilePath
Expand Down Expand Up @@ -126,14 +126,14 @@ public extension Netrc {
}
}

@available (OSX 10.13, *)
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
extension Netrc.Error: CustomNSError {
public var errorUserInfo: [String : Any] {
return [NSLocalizedDescriptionKey: "\(self)"]
}
}

@available (OSX 10.13, *)
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
fileprivate enum RegexUtil {
@frozen fileprivate enum Token: String, CaseIterable {
case machine, login, password, account, macdef, `default`
Expand Down