Skip to content

New name for "disable automatic resolution" #3706

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 1 commit into from
Sep 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Sources/Commands/Options.swift
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,9 @@ public struct SwiftToolOptions: ParsableArguments {
inversion: .prefixedEnableDisable,
help: "Enable code coverage")
var shouldEnableCodeCoverage: Bool = false

// TODO: Does disable-automatic-resolution alias force-resolved-versions?

/// Use Package.resolved file for resolving dependencies.
@Flag(name: [.long, .customLong("disable-automatic-resolution")], help: "Disable automatic resolution if Package.resolved file is out-of-date")
@Flag(name: [.long, .customLong("disable-automatic-resolution"), .customLong("only-use-versions-from-resolved-file")], help: "Only use versions from the Package.resolved file and fail resolution if it is out-of-date")
Copy link
Contributor

Choose a reason for hiding this comment

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

should we also add a deprecation warning when using the old flag to encourage folks to transition over? or at least adda comment here to say which one is "preferred"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure we can know which of the flags was used, maybe @natecook1000 has an idea how to do that without splitting it out into multiple flags.

var forceResolvedVersions: Bool = false

// @Flag works best when there is a default value present
Expand Down