Skip to content

Commit d7ea854

Browse files
committed
cleanup
1 parent 09454ad commit d7ea854

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

Sources/PackageDescription/PackageDependency.swift

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extension Package {
2323
/// If you add the Swift package as a package dependency to an app for an Apple platform,
2424
/// you can find the `Package.resolved` file inside your `.xcodeproj` or `.xcworkspace`.
2525
public class Dependency: Encodable {
26-
26+
@available(_PackageDescription, introduced: 999)
2727
public enum Kind: Encodable {
2828
case fileSystem(name: String?, path: String)
2929
case sourceControl(name: String?, location: String, requirement: SourceControlRequirement)
@@ -33,8 +33,8 @@ extension Package {
3333
@available(_PackageDescription, introduced: 999)
3434
public let kind: Kind
3535

36-
/// The name of the package, or `nil` to deduce the name using the package's Git URL.
37-
@available(*, deprecated, message: "use kind instead")
36+
/// The name of the dependency, or `nil` to deduce the name using the package's Git URL.
37+
@available(_PackageDescription, deprecated: 999, message: "use kind instead")
3838
public var name: String? {
3939
get {
4040
switch self.kind {
@@ -48,7 +48,8 @@ extension Package {
4848
}
4949
}
5050

51-
@available(*, deprecated, message: "use kind instead")
51+
/// The location of the dependency.
52+
@available(_PackageDescription, deprecated: 999, message: "use kind instead")
5253
public var url: String? {
5354
get {
5455
switch self.kind {
@@ -62,8 +63,8 @@ extension Package {
6263
}
6364
}
6465

65-
/// The dependency requirement of the package dependency.
66-
@available(*, deprecated, message: "use kind instead")
66+
/// The requirement of the dependency.
67+
@available(_PackageDescription, deprecated: 999, message: "use kind instead")
6768
public var requirement: Requirement {
6869
get {
6970
switch self.kind {
@@ -108,23 +109,18 @@ extension Package {
108109
}
109110
}
110111

111-
@available(_PackageDescription, introduced: 999)
112112
init(kind: Kind) {
113113
self.kind = kind
114114
}
115115

116-
@available(_PackageDescription, introduced: 999)
117116
convenience init(name: String?, path: String) {
118117
self.init(kind: .fileSystem(name: name, path: path))
119118
}
120119

121-
@available(_PackageDescription, introduced: 999)
122120
convenience init(name: String?, location: String, requirement: SourceControlRequirement) {
123121
self.init(kind: .sourceControl(name: name, location: location, requirement: requirement))
124122
}
125123

126-
/// Initializes and returns a newly allocated requirement with the specified identity and requirements.
127-
@available(_PackageDescription, introduced: 999)
128124
convenience init(identity: String, requirement: RegistryRequirement) {
129125
self.init(kind: .registry(identity: identity, requirement: requirement))
130126
}

0 commit comments

Comments
 (0)