Uploaded image for project: 'Swift'
  1. Swift
  2. SR-13814

Add the allPlatforms property to the Platform struct in PackageDescription

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Package Manager
    • Labels:
      None

      Description

      I propose to extend the Platform struct in the PackageDescription API with a property that would return all the platforms that SwiftPM knows about. Something like this:

      extension Platform {
          public static let allPlatforms: [Platform] = [
              .macOS,
              .iOS,
              .watchOS,
              .tvOS,
              .linux,
              .android,
              .windows,
              .wasi,
          ]
      }
      

      Rationale: see SR-13813.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            broadway_lamb Sergej Jaskiewicz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: