Skip to content

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Oct 5, 2025

SwiftPM and swift test use Swift Argument Parser which allows developers to specify arguments of the form --foo=bar. Our bare-bones argument parser doesn't currently recognize that pattern, which means that the developer could write --foo=bar but get the wrong behavior.

This PR adds support for that pattern by changing how we parse command-line arguments to allow for both --foo bar and --foo=bar.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

SwiftPM and `swift test` use Swift Argument Parser which allows developers to
specify arguments of the form `--foo=bar`. Our bare-bones argument parser
doesn't currently recognize that pattern, which means that the developer could
write `--foo=bar` but get the wrong behavior.

This PR adds support for that pattern by changing how we parse command-line
arguments to allow for both `--foo bar` and `--foo=bar`.
@grynspan grynspan added this to the Swift 6.x (main) milestone Oct 5, 2025
@grynspan grynspan self-assigned this Oct 5, 2025
@grynspan grynspan added the bug 🪲 Something isn't working label Oct 5, 2025
@grynspan grynspan requested a review from stmontgomery as a code owner October 5, 2025 15:10
@grynspan grynspan added the command-line experience ⌨️ enhancements to the command line interface label Oct 5, 2025
@grynspan grynspan requested a review from plemarquand October 6, 2025 20:30
@grynspan grynspan merged commit 75d5929 into main Oct 6, 2025
24 checks passed
@grynspan grynspan deleted the jgrynspan/foo=bar branch October 6, 2025 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working command-line experience ⌨️ enhancements to the command line interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants