Skip to content

Commit ceb9050

Browse files
authored
add missing "since" and "availability" tags on platform versions (#6140)
motivation: nicer documentation regarding availability changes: add missing attributes in package description rdar://96372508
1 parent e1102e4 commit ceb9050

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed

Sources/PackageDescription/SupportedPlatforms.swift

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -279,27 +279,31 @@ extension SupportedPlatform {
279279
/// The value that represents macOS 10.10.
280280
///
281281
/// - Since: First available in PackageDescription 5.0.
282-
@available(_PackageDescription, deprecated: 5.7, message: "macOS 10.13 is the oldest supported version")
282+
@available(_PackageDescription, introduced: 5.0, deprecated: 5.7, message: "macOS 10.13 is the oldest supported version")
283283
public static let v10_10: MacOSVersion = .init(string: "10.10")
284284

285285
/// The value that represents macOS 10.11.
286286
///
287287
/// - Since: First available in PackageDescription 5.0.
288-
@available(_PackageDescription, deprecated: 5.7, message: "macOS 10.13 is the oldest supported version")
288+
@available(_PackageDescription, introduced: 5.0, deprecated: 5.7, message: "macOS 10.13 is the oldest supported version")
289289
public static let v10_11: MacOSVersion = .init(string: "10.11")
290290

291291
/// The value that represents macOS 10.12.
292292
///
293293
/// - Since: First available in PackageDescription 5.0.
294-
@available(_PackageDescription, deprecated: 5.7, message: "macOS 10.13 is the oldest supported version")
294+
@available(_PackageDescription, introduced: 5.0, deprecated: 5.7, message: "macOS 10.13 is the oldest supported version")
295295
public static let v10_12: MacOSVersion = .init(string: "10.12")
296296

297297
/// The value that represents macOS 10.13.
298298
///
299299
/// - Since: First available in PackageDescription 5.0.
300+
@available(_PackageDescription, introduced: 5.0)
300301
public static let v10_13: MacOSVersion = .init(string: "10.13")
301302

302303
/// The value that represents macOS 10.14.
304+
///
305+
/// - Since: First available in PackageDescription 5.0.
306+
@available(_PackageDescription, introduced: 5.0)
303307
public static let v10_14: MacOSVersion = .init(string: "10.14")
304308

305309
/// The value that represents macOS 10.15.
@@ -313,9 +317,11 @@ extension SupportedPlatform {
313317
///
314318
/// - Since: First available in PackageDescription 5.3.
315319
@available(*, unavailable, renamed: "v11")
320+
@available(_PackageDescription, introduced: 5.3)
316321
public static let v10_16: MacOSVersion = .init(string: "11.0")
317322

318323
/// The value that represents macOS 11.0.
324+
/// - Since: First available in PackageDescription 5.3.
319325
@available(_PackageDescription, introduced: 5.3)
320326
public static let v11: MacOSVersion = .init(string: "11.0")
321327

@@ -347,23 +353,25 @@ extension SupportedPlatform {
347353
/// The value that represents tvOS 9.0.
348354
///
349355
/// - Since: First available in PackageDescription 5.0.
350-
@available(_PackageDescription, deprecated: 5.7, message: "tvOS 11.0 is the oldest supported version")
356+
@available(_PackageDescription, introduced: 5.0, deprecated: 5.7, message: "tvOS 11.0 is the oldest supported version")
351357
public static let v9: TVOSVersion = .init(string: "9.0")
352358

353359
/// The value that represents tvOS 10.0.
354360
///
355361
/// - Since: First available in PackageDescription 5.0.
356-
@available(_PackageDescription, deprecated: 5.7, message: "tvOS 11.0 is the oldest supported version")
362+
@available(_PackageDescription, introduced: 5.0, deprecated: 5.7, message: "tvOS 11.0 is the oldest supported version")
357363
public static let v10: TVOSVersion = .init(string: "10.0")
358364

359365
/// The value that represents tvOS 11.0.
360366
///
361367
/// - Since: First available in PackageDescription 5.0.
368+
@available(_PackageDescription, introduced: 5.0)
362369
public static let v11: TVOSVersion = .init(string: "11.0")
363370

364371
/// The value that represents tvOS 12.0.
365372
///
366373
/// - Since: First available in PackageDescription 5.0.
374+
@available(_PackageDescription, introduced: 5.0)
367375
public static let v12: TVOSVersion = .init(string: "12.0")
368376

369377
/// The value that represents tvOS 13.0.
@@ -443,29 +451,31 @@ extension SupportedPlatform {
443451
/// The value that represents iOS 8.0.
444452
///
445453
/// - Since: First available in PackageDescription 5.0.
446-
@available(_PackageDescription, deprecated: 5.7, message: "iOS 11.0 is the oldest supported version")
454+
@available(_PackageDescription, introduced: 5.0, deprecated: 5.7, message: "iOS 11.0 is the oldest supported version")
447455
public static let v8: IOSVersion = .init(string: "8.0")
448456

449457
/// The value that represents iOS 9.0.
450458
///
451459
/// - Since: First available in PackageDescription 5.0.
452-
@available(_PackageDescription, deprecated: 5.7, message: "iOS 11.0 is the oldest supported version")
460+
@available(_PackageDescription, introduced: 5.0, deprecated: 5.7, message: "iOS 11.0 is the oldest supported version")
453461
public static let v9: IOSVersion = .init(string: "9.0")
454462

455463
/// The value that represents iOS 10.0.
456464
///
457465
/// - Since: First available in PackageDescription 5.0.
458-
@available(_PackageDescription, deprecated: 5.7, message: "iOS 11.0 is the oldest supported version")
466+
@available(_PackageDescription, introduced: 5.0, deprecated: 5.7, message: "iOS 11.0 is the oldest supported version")
459467
public static let v10: IOSVersion = .init(string: "10.0")
460468

461469
/// The value that represents iOS 11.0.
462470
///
463471
/// - Since: First available in PackageDescription 5.0.
472+
@available(_PackageDescription, introduced: 5.0)
464473
public static let v11: IOSVersion = .init(string: "11.0")
465474

466475
/// The value that represents iOS 12.0.
467476
///
468477
/// - Since: First available in PackageDescription 5.0.
478+
@available(_PackageDescription, introduced: 5.0)
469479
public static let v12: IOSVersion = .init(string: "12.0")
470480

471481
/// The value that represents iOS 13.0.
@@ -508,23 +518,25 @@ extension SupportedPlatform {
508518
/// The value that represents watchOS 2.0.
509519
///
510520
/// - Since: First available in PackageDescription 5.0.
511-
@available(_PackageDescription, deprecated: 5.7, message: "watchOS 4.0 is the oldest supported version")
521+
@available(_PackageDescription, introduced: 5.0, deprecated: 5.7, message: "watchOS 4.0 is the oldest supported version")
512522
public static let v2: WatchOSVersion = .init(string: "2.0")
513523

514524
/// The value that represents watchOS 3.0.
515525
///
516526
/// - Since: First available in PackageDescription 5.0.
517-
@available(_PackageDescription, deprecated: 5.7, message: "watchOS 4.0 is the oldest supported version")
527+
@available(_PackageDescription, introduced: 5.0, deprecated: 5.7, message: "watchOS 4.0 is the oldest supported version")
518528
public static let v3: WatchOSVersion = .init(string: "3.0")
519529

520530
/// The value that represents watchOS 4.0.
521531
///
522532
/// - Since: First available in PackageDescription 5.0.
533+
@available(_PackageDescription, introduced: 5.0)
523534
public static let v4: WatchOSVersion = .init(string: "4.0")
524535

525536
/// The value that represents watchOS 5.0.
526537
///
527538
/// - Since: First available in PackageDescription 5.0.
539+
@available(_PackageDescription, introduced: 5.0)
528540
public static let v5: WatchOSVersion = .init(string: "5.0")
529541

530542
/// The value that represents watchOS 6.0.
@@ -565,18 +577,26 @@ extension SupportedPlatform {
565577
}
566578

567579
/// The value that represents DriverKit 19.0.
580+
///
581+
/// - Since: First available in PackageDescription 5.5.
568582
@available(_PackageDescription, introduced: 5.5)
569583
public static let v19: DriverKitVersion = .init(string: "19.0")
570584

571585
/// The value that represents DriverKit 20.0.
586+
///
587+
/// - Since: First available in PackageDescription 5.5.
572588
@available(_PackageDescription, introduced: 5.5)
573589
public static let v20: DriverKitVersion = .init(string: "20.0")
574590

575591
/// The value that represents DriverKit 21.0.
592+
///
593+
/// - Since: First available in PackageDescription 5.5.
576594
@available(_PackageDescription, introduced: 5.5)
577595
public static let v21: DriverKitVersion = .init(string: "21.0")
578596

579597
/// The value that represents DriverKit 22.0.
598+
///
599+
/// - Since: First available in PackageDescription 5.7.
580600
@available(_PackageDescription, introduced: 5.7)
581601
public static let v22: DriverKitVersion = .init(string: "22.0")
582602
}

0 commit comments

Comments
 (0)