Skip to content

Commit 9a23d5c

Browse files
authored
deprecate netrc (#287)
motivation: move netrc to SwiftPM changes: mark netrc utilities and tests as deprecated
1 parent c2a3c4f commit 9a23d5c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Sources/TSCUtility/Netrc.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ extension AuthorizationProviding {
2323
which is only available in macOS 10.13+, iOS 11+, etc at this time.
2424
*/
2525
/// Container of parsed netrc connection settings
26+
// FIXME: deprecate 2/2022, remove once clients transitioned
27+
@available(*, deprecated, message: "moved to SwiftPM")
2628
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
2729
public struct Netrc {
2830
/// Representation of `machine` connection settings & `default` connection settings.
@@ -98,6 +100,8 @@ public struct Netrc {
98100
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
99101
extension Netrc: AuthorizationProviding {}
100102

103+
// FIXME: deprecate 2/2022, remove once clients transitioned
104+
@available(*, deprecated, message: "moved to SwiftPM")
101105
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
102106
public extension Netrc {
103107
enum Error: Swift.Error {
@@ -136,13 +140,17 @@ public extension Netrc {
136140
}
137141
}
138142

143+
// FIXME: deprecate 2/2022, remove once clients transitioned
144+
@available(*, deprecated, message: "moved to SwiftPM")
139145
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
140146
extension Netrc.Error: CustomNSError {
141147
public var errorUserInfo: [String : Any] {
142148
return [NSLocalizedDescriptionKey: "\(self)"]
143149
}
144150
}
145151

152+
// FIXME: deprecate 2/2022, remove once clients transitioned
153+
@available(*, deprecated, message: "moved to SwiftPM")
146154
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
147155
fileprivate enum RegexUtil {
148156
@frozen fileprivate enum Token: String, CaseIterable {

Tests/TSCUtilityTests/NetrcTests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import XCTest
22
import TSCUtility
33

4-
@available(macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
4+
// FIXME: deprecate 2/2022, remove once clients transitioned
5+
@available(*, deprecated, message: "moved to SwiftPM")
56
/// Netrc feature depends upon `NSTextCheckingResult.range(withName name: String) -> NSRange`,
67
/// which is only available in macOS 10.13+ at this time.
8+
@available(macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
79
class NetrcTests: XCTestCase {
810
/// should load machines for a given inline format
911
func testLoadMachinesInline() {

0 commit comments

Comments
 (0)