Skip to content

Clean up options and flags for package, build, and test subcommands #370

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

Merged
merged 8 commits into from
May 26, 2016

Conversation

abertelrud
Copy link
Contributor

Changes for https://bugs.swift.org/browse/SR-1605
This cleans up the options that the new package and the old build
and test subcommands take. Things had become ugly after implementing
SE-0085.

This cleans up the options that the new `package` and the old `build`
and `test` subcommands take.  Things had become ugly after implementing
SE-0085.
@@ -37,11 +37,11 @@ private enum Mode: Argument, Equatable, CustomStringConvertible {

init?(argument: String, pop: () -> String?) throws {
switch argument {
case "--configuration", "--conf", "-c":
case "--configuration", "--config":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we should drop -c just yet, I think people and scripts are likely to rely on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I've added it back. There is perhaps a broader conversation to be had about whether we in general support old-style single-dash/single-char short forms or just the double-dash/whole-word forms. I've looked at various tools for example and they seem all over the map about this, and not just the ancient ones either.

But we certainly don't want to break anything, so I've added it back.

@abertelrud
Copy link
Contributor Author

Thanks for all the comments — I'm preparing another iteration of the PR.

case generateXcodeproj(String?)
case dumpPackage(String?)
case generateXcodeproj
case dumpPackage

init?(argument: String, pop: () -> String?) throws {
switch argument {
case "init", "initialize":
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to get rid of initialize here? Seems wasteful.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to getting rid of it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gone.

@abertelrud
Copy link
Contributor Author

I think I've addressed all the feedback. So far I haven't seen any dissent to the email I sent earlier, so I think we're converging.

@ddunbar
Copy link
Contributor

ddunbar commented May 26, 2016

LGTM

@ddunbar
Copy link
Contributor

ddunbar commented May 26, 2016

LGTM

@abertelrud
Copy link
Contributor Author

Great, thanks for the reviews and comments. I'm merging this now.

@abertelrud abertelrud merged commit 34714c0 into swiftlang:master May 26, 2016
@abertelrud abertelrud deleted the option-cleanup branch May 26, 2016 21:32
abertelrud added a commit that referenced this pull request May 26, 2016
Clean up options and flags for `package`, `build`, and `test` subcommands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants