Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: apple/swift-argument-parser
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.7.1
Choose a base ref
...
head repository: apple/swift-argument-parser
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.8.0
Choose a head ref
  • 15 commits
  • 64 files changed
  • 7 contributors

Commits on Mar 22, 2026

  1. Configuration menu
    Copy the full SHA
    4babd31 View commit details
    Browse the repository at this point in the history
  2. Update package to use a minimum of Swift 6 (#882)

    * Make Swift 6 the minimum version
    * Remove CI runs for older Swift versions
    * Move from Result to typed throws in parser
    * Refactor plugin code into shared files
    * Readme/docs updates
    natecook1000 authored Mar 22, 2026
    Configuration menu
    Copy the full SHA
    747565c View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2026

  1. Augment Option to support default as flag option (#830)

    In some use cases, there is a need to have an option argument behave
    like a flag.
    
    This change introduced 4 new intialiazers to `Option` that accept a
    `defaultAsFlag` value.
    
    With the following usage:
    
    ```swift
    struct Example: ParsableCommand {
        @option(defaultAsFlag: "default", help: "Set output format.")
        var format: String?
        func run() {
            print("Format: \(format ?? "none")")
        }
    }
    ```
    
    The `defaultAsFlag` parameter creates a hybrid that supports both patterns:
      - **Flag behavior**: `--format` (sets format to "default")
      - **Option behavior**: `--format json` (sets format to "json")
      - **No usage**: format remains `nil`
    
    As a user of the command line tool, the `--help` output clearly distinguishes
    between the the hybrid and regular usages.
    
    ```
    OPTIONS:
      --format [<format>]     Set output format. (default as flag: default)
    ````
    
    Note the `(default as flag: ...)` text instead of regular `(default: ...)`,
    and the optional value syntax `[<value>]` instead of required `<value>`.
    
    Fixes: #829
    bkhouri authored Mar 23, 2026
    Configuration menu
    Copy the full SHA
    a78d98b View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2026

  1. Configuration menu
    Copy the full SHA
    11c1ea9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aeb51bc View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2026

  1. Support async custom completion functions for AsyncParsableCommand

    …via async/await (#855)
    
    * Support async custom completion functions for AsyncParsableCommand via async/await.
    * Improve ParsableArguments#_errorLabel DocC.
    * Fix preexisting typo.
    
    Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
    rgoldberg authored Apr 6, 2026
    Configuration menu
    Copy the full SHA
    d6f4e7a View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2026

  1. Configuration menu
    Copy the full SHA
    e552972 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2026

  1. Bump the swiftlang-actions group with 2 updates (#889)

    Bumps the swiftlang-actions group with 2 updates: [swiftlang/github-workflows/.github/workflows/swift_package_test.yml](https://github.com/swiftlang/github-workflows) and [swiftlang/github-workflows/.github/workflows/soundness.yml](https://github.com/swiftlang/github-workflows).
    
    
    Updates `swiftlang/github-workflows/.github/workflows/swift_package_test.yml` from 0.0.9 to 0.0.10
    - [Release notes](https://github.com/swiftlang/github-workflows/releases)
    - [Commits](swiftlang/github-workflows@0.0.9...0.0.10)
    
    Updates `swiftlang/github-workflows/.github/workflows/soundness.yml` from 0.0.9 to 0.0.10
    - [Release notes](https://github.com/swiftlang/github-workflows/releases)
    - [Commits](swiftlang/github-workflows@0.0.9...0.0.10)
    
    ---
    updated-dependencies:
    - dependency-name: swiftlang/github-workflows/.github/workflows/swift_package_test.yml
      dependency-version: 0.0.10
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: swiftlang-actions
    - dependency-name: swiftlang/github-workflows/.github/workflows/soundness.yml
      dependency-version: 0.0.10
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: swiftlang-actions
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Apr 17, 2026
    Configuration menu
    Copy the full SHA
    3a282f0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    16cae93 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2026

  1. Display command aliases in generated man-pages (#891)

    Subcommand aliases already surface in --help and dump-help, but the
    generate-manual tool ignored CommandInfoV0.aliases. Single-page output
    now lists aliases inline with the subcommand name (e.g. "multiply, mul"),
    matching the --help format. Multi-page output lists aliases as
    comma-separated .Nm entries in the NAME section, following the BSD mdoc
    convention (see ls(1)).
    
    Resolves #851.
    qflen authored Apr 22, 2026
    Configuration menu
    Copy the full SHA
    63958cf View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2026

  1. Improve diagnostic for @Flag Bool? without inversion: (#892)

    When a user declares `@Flag(...) var x: Bool?` without the required
    `inversion:` parameter, overload resolution falls through to the
    `Flag where Value == Int` initializer and the compiler reports
    "requires the types 'Bool?' and 'Int' be equivalent", which does not
    point the user at the real cause.
    
    Add an `@available(*, unavailable)` init overload on
    `Flag where Value == Bool?` with a message that names the missing
    parameter. Follows the same pattern used for the unavailable no-arg
    `Flag.init()` at the top of the file.
    
    Resolves #835.
    qflen authored Apr 23, 2026
    Configuration menu
    Copy the full SHA
    a544331 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2026

  1. Disable the nightly-main Windows test job (#897)

    Failing for reasons unknown; tracked in #896.
    natecook1000 authored May 8, 2026
    Configuration menu
    Copy the full SHA
    6ea3782 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2026

  1. Make NameSpecification and its element ExpressibleByStringLiteral (#745)

    This simplifies declaring alternate names by allowing just
    a string representation of an option or flag name. The string
    is parsed to split on spaces, and then validates that each
    name has either a one or two dash prefix and is ASCII only.
    
    Existing style:
    
        @Flag(name: [.customLong("hex-output"), .customShort("x")])
        var hexadecimalOutput = false
    
    New style:
    
        @Flag(name: "--hex-output -x")
        var hexadecimalOutput = false
    natecook1000 authored May 23, 2026
    Configuration menu
    Copy the full SHA
    af51a49 View commit details
    Browse the repository at this point in the history

Commits on May 25, 2026

  1. Configuration menu
    Copy the full SHA
    2ba6fc9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5e0406d View commit details
    Browse the repository at this point in the history
Loading