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

upgrade: Make --keep-going the default #308

Merged

Conversation

autoantwort
Copy link
Contributor

Closes #17922

Copy link

@vkaytsanov vkaytsanov left a comment

Choose a reason for hiding this comment

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

Ship it

@strega-nil-ms
Copy link
Contributor

I like this choice; however, it definitely requires discussion.

@strega-nil-ms strega-nil-ms added the requires:discussion This PR requires discussion of the correct way forward label Dec 29, 2021
Copy link
Contributor

@strega-nil-ms strega-nil-ms left a comment

Choose a reason for hiding this comment

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

Thanks, just some minor stuff.

{OPTION_NO_DRY_RUN, "Actually upgrade"},
{OPTION_KEEP_GOING, "Continue installing packages on failure"},
{OPTION_KEEP_GOING, "The default (deprecated)"},
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{OPTION_KEEP_GOING, "The default (deprecated)"},
{OPTION_KEEP_GOING, "Continue installing packages on failure (default)"},

{OPTION_NO_DRY_RUN, "Actually upgrade"},
{OPTION_KEEP_GOING, "Continue installing packages on failure"},
{OPTION_KEEP_GOING, "The default (deprecated)"},
{OPTION_STOP_AT_FAILURE, "Stop installing packages on failure"},
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{OPTION_STOP_AT_FAILURE, "Stop installing packages on failure"},
{OPTION_NO_KEEP_GOING, "Stop installing packages on failure"},

Comment on lines 59 to 66
if (Util::Sets::contains(options.switches, OPTION_KEEP_GOING))
{
print2(Color::warning,
"The option `",
OPTION_KEEP_GOING,
"` is the default now. You don't have to pass this option anymore.");
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (Util::Sets::contains(options.switches, OPTION_KEEP_GOING))
{
print2(Color::warning,
"The option `",
OPTION_KEEP_GOING,
"` is the default now. You don't have to pass this option anymore.");
}

it's not standard practice to warn on passing the "default" for an option.

@@ -54,8 +56,16 @@ namespace vcpkg::Commands::Upgrade

const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE);

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, make sure that you check for both OPTION_KEEP_GOING and OPTION_NO_KEEP_GOING and error if both are passed.

@@ -24,11 +24,13 @@ namespace vcpkg::Commands::Upgrade

static constexpr StringLiteral OPTION_NO_DRY_RUN = "no-dry-run";
static constexpr StringLiteral OPTION_KEEP_GOING = "keep-going";
static constexpr StringLiteral OPTION_STOP_AT_FAILURE = "stop-at-failure";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
static constexpr StringLiteral OPTION_STOP_AT_FAILURE = "stop-at-failure";
static constexpr StringLiteral OPTION_NO_KEEP_GOING = "no-keep-going";

this is the standard.

@strega-nil-ms strega-nil-ms added requires:author-response and removed requires:discussion This PR requires discussion of the correct way forward labels Jan 6, 2022
@strega-nil-ms strega-nil-ms merged commit 9e76536 into microsoft:main Feb 18, 2022
@autoantwort autoantwort deleted the make-upgrade---keep-going-the-default branch August 9, 2022 15:31
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.

4 participants