Skip to content

Migrate from Commandant to Swift Argument Parser #542

@rgoldberg

Description

@rgoldberg

Migrate from Commandant to Apple's open source Swift Argument Processor.

Commandant has been dormant for 4+ years

Swift Argument Parser supports subcommand aliases (#281), can generate bash, zsh & fish completion scripts (#453 & #222), provides argument validation & error messages (#480 & #533), is more concise/clean, and is actively being developed with Apple's full commitment.

I have a working branch ready to be submitted as a PR once my PR with the fix for the current main lint issue has been merged.

This change:

  • updates the minimum Swift Tools version from 5.3 to 5.5 (supported by macOS 11 & later; 11 & 12 are already EOL, so this shouldn't cause issues)
  • moves everything from MasKit to mas (I also renamed MasKitTests to masTests for consistency)
  • removes the dependency on the swift-format library, as it depends upon an older version of Swift Argument Parser. Brewfile now contains brew swift-format. lint & format now call swift-format as a normal command.

Metadata

Metadata

Assignees

Labels

🧽 choreAdministrative task: documentation, build, test, release, git, etc.

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions