Beta Changelogs #3100
epage
announced in
Information
Beta Changelogs
#3100
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
v3.0.0-beta.5 (2021-10-18)
BREAKING CHANGES
unicode_help
tounicode
to encompass more functionalityApp::replace
is now gated behindunstable-replace
derive
requirementclap::ArgEnum
clap::Args
clap::FromArgMatches
clap::IntoApp
clap::Subcommand
clap::Clap
=>clap::Parser
App::generate_usage
=>App::render_usage
AppSettings::DisableVersionForSubcommands
is now default behaviourAppSettings::ColoredHelp
: we are now relying solely on thecolor
feature flag andApp::color
methodAppSettings::StrictUtf8
is now default behaviourAppSettings::AllowInvalidUtf8
in favor ofArgSettings::AllowInvalidUtf8
AppSettings::UnifiedHelpMessage
is now default behaviourAppSettings::ColorAlways
in favor ofApp::color
AppSettings::ColorNever
in favor ofApp::color
AppSettings::ColorAuto
in favor ofApp::color
App::get_flags
App::get_positionals_with_no_heading
App::get_flags_with_no_heading
App::get_opts_with_no_heading
App::stop_custom_headings
in favor ofApp:help_heading(None)
Error::with_description
in favor ofApp::error
ArgEnum::as_arg
in favor ofArgEnum::to_arg_value
Generator::all_subcommands
Generator::find_subcommand_with_path
Generator::subcommands
Generator::shorts_and_visible_aliases
Generator::longs_and_visible_aliases
Generator::flags
ArgEnum::VARIANTS
in favor ofArgEnum::value_variants
clap::clap_app!
in favor of other buildersApp::get_possible_values
returnsOption<&[ArgValue]>
nowRegexRef
is now an enum also allowingRegexSet
to be usedclap_generate::Generator::file_name
andclap_generate::Generator::generate
now take&self
clap_generate::generate
andclap_generate::generate_to
now takesGenerator
as first argumentFeatures
clap::ArgValue
to denote information about possible values for argsclap::ColorChoice
to specify color setting for the appAppSettings::AllowInvalidUtf8ForExternalSubcommands
AppSettings::Multicall
behindunstable-multicall
featureArgSettings::AllowInvalidUtf8
ArgEnum::value_variants
ArgEnum::to_arg_value
App::color
App::error
App::get_long_about
App::get_help_heading
Arg::is_positional
v3.0.0-beta.4 (2021-08-14)
Minimum Required Rust
clap
requiresrustc 1.54.0
or greater.BREAKING CHANGES
Added
unicode_help
,env
features.env
:Arg::env
Arg::env_os
Arg::hide_env_values
ArgSettings::HideEnvValues
Arg::settings
in favor ofArg::setting(Setting1 | Setting2)
Arg::multiple
in favour ofArg::multiple_values
andArg::multiple_occurrences
AppSettings::DisableHelpFlags
=>AppSettings::DisableHelpFlag
AppSettings::DisableVersion
=>AppSettings::DisableVersionFlag
AppSettings::VersionlessSubcommands
=>AppSettings::DisableVersionForSubcommands
(changed again 3.0.0-beta.5)ErrorKind::MissingArgumentOrSubcommand
=>ErrorKind::DisplayHelpOnMissingArgumentOrSubcommand
ArgSettings::AllowEmptyValues
changing toArgSettings::ForbidEmptyValues
AppSettings::GlobalVersion
renamed toAppSettings::PropagateVersion
and it is not appliedglobally anymore
Arg::env
,Arg::env_os
,Arg::last
,Arg::require_equals
,Arg::allow_hyphen_values
,Arg::hide_possible_values
,Arg::hide_default_value
,Arg::hide_env_values
,Arg::case_insensitive
andArg::multiple_values
does not setArgSettings::TakesValue
anymoreArg::require_delimiter
does not setArgSettings::TakesValue
andArgSettings::UseValueDelimiter
anymore
Arg::require_equals
does not disallow empty values anymoreArg::default_value_if
,Arg::default_value_if_os
,Arg::default_value_ifs
,Arg::default_value_ifs_os
now takes the default value parameter as an optionArg::index
,Arg::number_of_values
,Arg::min_values
,Arg::max_values
now takesusize
Arg::value_delimiter
now acceptschar
instead of&str
ArgMatches::is_present
does not handle subcommand names anymoreArgSettings::TakesValue
clap_generate::generate_to
now returnsResult<PathBuf, io::Error>
@group
inclap_app!
now needs:
instead of=>
app
andarg
objects inyaml
now allow unknown keys if_has_metadata
is setFeatures
clap_generate::Shell
clap::Args
behindderive
featureApp::license
Arg::get_long_about
Arg::get_env
Arg::get_default_values
Arg::hide_env
Arg::required_if_eq_all
Arg::forbid_empty_values
Arg::max_occurrences
ArgMatches::grouped_values_of
crate_license!
Error::print
AppSettings::UseLongFormatForHelpSubcommand
AppSettings::IgnoreErrors
AppSettings::InferLongArgs
ArgSettings::HideEnv
Enhancements
v3.0.0-beta.2 (2020-09-18)
BREAKING CHANGES
From<&yaml_rust::yaml::Hash>
forArgGroup
App::write_version
in favor ofwrite!(w, App::render_version)
App::write_long_version
in favor ofwrite!(w, App::render_long_version)
Error::cause
in favor of<Error as Display>::to_string
_clap_count_exprs!
App::set_term_width
=>App::term_width
Arg::from_yaml
=>Arg::from
Arg::with_name
=>Arg::new
Arg::required_if
=>Arg::required_if_eq
Arg::required_ifs
=>Arg::required_if_eq_any
Arg::required_unless
=>Arg::required_unless_present
Arg::required_unless_one
=>Arg::required_unless_present_any
Arg::required_unless_all
=>Arg::required_unless_present_all
ArgGroup::from_yaml
=>ArgGroup::from
ArgGroup::with_name
=>ArgGroup::new
ErrorKind::HelpDisplayed
=>ErrorKind::DisplayHelp
ErrorKind::VersionDisplayed
=>ErrorKind::DisplayVersion
App::print_help
&App::print_long_help
now returnstd::io::Result
App::write_help
&App::write_long_help
now returnstd::io::Result
Error::info
now is of typeVec<String>
instead ofOption<Vec<String>>
ArgMatches::subcommand
now returnsOption<(&str, &ArgMatches)>
short
in#[clap()]
now acceptschar
instead of&str
Features
Indices
that is returned byArgMatches::indices_of
@global_setting
for app's macro builderArg::default_missing_value
Arg::default_missing_value_os
Arg::default_missing_values
Arg::default_missing_values_os
Arg::short_alias
Arg::short_aliases
Arg::visible_short_alias
Arg::visible_short_aliases
Arg::value_hint
Arg::validator_regex
(gated behindregex
feature)App::subcommand_placeholder
App::before_long_help
App::after_long_help
Enhancements
help_heading
defined onArg
now has higher priority thanApp
wrap_help
feature is not enabledv3.0.0-beta.1 (2020-05-03)
Minimum Required Rust
clap
requiresrustc 1.40.0
or greater.BREAKING CHANGES
Added
std
,cargo
,derive
features.Gated behind
cargo
:crate_name!
crate_version!
crate_authors!
crate_description!
app_from_crate!
Removed
SubCommand
in favor ofApp
SubCommand::with_name
=>App::new
SubCommand::from_yaml
=>App::from
Shell
(changed again in 3.0.0-beta.4)App::with_defaults
App::version_message
in favor ofApp::mut_arg
App::version_short
in favor ofApp::mut_arg
App::help_message
in favor ofApp::mut_arg
App::help_short
in favor ofApp::mut_arg
App::arg_from_usage
in favor ofApp::arg
App::args_from_usage
in favor ofApp::args
App::settings
in favor ofApp::setting(Setting1 | Setting2)
App::unset_settings
in favor ofApp::unset_setting(Setting1 | Setting2)
App::global_settings
in favor ofApp::global_setting(Setting1 | Setting2)
App::gen_completions
in favor of TODO:App::gen_completions_to
in favor of TODO:Arg::empty_values
in favor of TODO:ArgMatches::usage
in favor ofApp::generate_usage
arg_enum!
in favor ofArgEnum
derive macro.value_t!
in favor ofArgMatches::value_of_t
value_t_or_exit!
in favor ofArgMatches::value_of_t_or_exit
values_t!
in favor ofArgMatches::values_of_t
values_t_or_exit!
in favor ofArgMatches::values_of_t_or_exit
Removed Settings
AppSettings::PropagateGlobalValuesDown
ArgSettings::Global
in favor ofArg::global
methodArgSettings::Multiple
in favor ofArgSettings::MultipleValues
andArgSettings::MultipleOccurrences
Renamed Methods
App::from_yaml
=>App::from
App::arg_from_usage
=>App::arg
App::help
=>App::override_help
App::usage
=>App::override_usage
App::template
=>App::help_template
App::get_matches_safe
=>App::try_get_matches
App::get_matches_from_safe
=>App::try_get_matches_from
App::get_matches_from_safe_borrow
=>App::try_get_matches_from_mut
Arg::help
=>Arg::about
Arg::from_usage
=>Arg::from
Arg::set
=>Arg::setting
Arg::unset
=>Arg::unset_setting
Renamed Settings
ArgSettings::CaseInsensitive
=>ArgSettings::IgnoreCase
ArgSettings::AllowLeadingHyphen
=>ArgSettings::AllowHyphenValues
ArgSettings::EmptyValues
=>ArgSettings::AllowEmptyValues
Renamed Fields
Error::message
=>Error::cause
Changed
App::write_help
is now a mutable reference instance method (takes&mut self
)Arg::short
now acceptschar
instead of&str
Arg::validator
now takes first argument asFn(&str) -> Result<O, E: ToString>
instead ofFn(String) -> Result<(), String>
Arg::validator_os
now takes first argument asFn(&OsStr) -> Result<O, OsString>
instead ofFn(&OsStr) -> Result<(), OsString>
Removed support for
{n}
in help textIn usage parser, for options
[name]... --option [val]
results inArgSettings::MultipleOccurrences
but
--option [val]...
results inArgSettings::MultipleValues
andArgSettings::MultipleOccurrences
.Before both resulted in the same thing.
App
andArg
now need only one lifetimeAllowing empty values is no longer the default (changed again in 3.0.0-beta.4)
UseValueDelimiter
is no longer the defaultApp::override_usage
no longer implies\t
which allows multi lined usagesFeatures
App::replace
App::get_matches_mut
App::mut_arg
App::unset_global_setting
App::help_heading
App::stop_custom_headings
Arg::exclusive
Arg::multiple_values
Arg::multiple_occurrences
Arg::help_heading
Arg::settings
(changed again in 3.0.0-beta.4)AppSettings::HelpRequired
AppSettings::NoAutoHelp
AppSettings::NoAutoVersion
ArgSettings::SubcommandPrecedenceOverArg
Enhancements
App::arg
andApp::args
more genericclap_app!
macro to make it support more wider use casesBeta Was this translation helpful? Give feedback.
All reactions