Skip to content
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

Remove platform requirement from Package.swift #427

Merged
merged 1 commit into from
Mar 16, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions Examples/count-lines/CountLines.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import ArgumentParser
import Foundation

@main
@available(macOS 10.15, *)
struct CountLines: AsyncParsableCommand {
@Argument(
help: "A file to count lines in. If omitted, counts the lines of stdin.",
Expand All @@ -26,6 +27,7 @@ struct CountLines: AsyncParsableCommand {
var verbose = false
}

@available(macOS 10.15, *)
extension CountLines {
var fileHandle: FileHandle {
get throws {
Expand Down
1 change: 0 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import PackageDescription

var package = Package(
name: "swift-argument-parser",
platforms: [.macOS(.v10_15), .macCatalyst(.v13), .iOS(.v13), .tvOS(.v13), .watchOS(.v6)],
products: [
.library(
name: "ArgumentParser",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

/// A type that can be executed asynchronously, as part of a nested tree of
/// commands.
@available(macOS 10.15, macCatalyst 13, iOS 13, tvOS 13, watchOS 6, *)
public protocol AsyncParsableCommand: ParsableCommand {
/// The behavior or functionality of this command.
///
Expand All @@ -22,6 +23,7 @@ public protocol AsyncParsableCommand: ParsableCommand {
mutating func run() async throws
}

@available(macOS 10.15, macCatalyst 13, iOS 13, tvOS 13, watchOS 6, *)
extension AsyncParsableCommand {
/// Executes this command, or one of its subcommands, with the program's
/// command-line arguments.
Expand Down Expand Up @@ -54,6 +56,7 @@ public protocol AsyncMainProtocol {
}

@available(swift, deprecated: 5.6)
@available(macOS 10.15, macCatalyst 13, iOS 13, tvOS 13, watchOS 6, *)
extension AsyncMainProtocol {
/// Executes the designated command type, or one of its subcommands, with
/// the program's command-line arguments.
Expand Down