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

Add first class citizen for "experimental" arguments #687

Open
bkhouri opened this issue Dec 20, 2024 · 0 comments
Open

Add first class citizen for "experimental" arguments #687

bkhouri opened this issue Dec 20, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@bkhouri
Copy link

bkhouri commented Dec 20, 2024

As a software developer, I want to define an argument as "experimental" and have swift-argument-parser handle adding the --experimental command line prefix


There are cases when we introduce an experimental command line argument to a command line tool. (e.g.: https://github.com/swiftlang/swift-package-manager/pull/8147/files#diff-e48104d0afa05391fe5ce04c6c616253d7770dab98a1f4497ac2a346606137aeR192)

instead of providing the name experimental-<actual-name>, it would be better to provide an boolean argument isExperimental: Bool which defaults to false. This way, there is consistency in the naming of experimental flag

Acceptance Criteria:

  • an isExperimental, or equivalent, argument is available for all argument types.
  • The isExperimental argument is a Boolean and defaults to false
  • if the argument is set to false, argument parser behaves as it does today
  • If the argument is set to true, the command line argument name is prefixed the name with experimental-. e.g.: --experimental-<name>
@natecook1000 natecook1000 added the enhancement New feature or request label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants