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

Ready for 3.0.0-rc.0 release #3067

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
if: matrix.features == 'none'
with:
command: test
args: --target ${{ matrix.target }} --no-default-features --features "std cargo" -p clap:3.0.0-beta.5
args: --target ${{ matrix.target }} --no-default-features --features "std cargo" -p clap:3.0.0-rc.0
- name: Test all features
uses: actions-rs/cargo@v1
if: matrix.features == 'all'
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
if: matrix.features == 'none'
with:
command: test
args: --no-default-features --features "std cargo" -p clap:3.0.0-beta.5
args: --no-default-features --features "std cargo" -p clap:3.0.0-rc.0
- name: Test all features
uses: actions-rs/cargo@v1
if: matrix.features == 'all'
Expand Down
26 changes: 24 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,28 @@ TODO: `YamlLoader`
<a name="v3.0.0-rc.0"></a>
## v3.0.0-rc.0

#### BREAKING CHANGES

* **Gated behind features**
* `ArgMatches::grouped_values_of` is now gated behind `unstable-grouped`
* **Renamed Structs**
* `clap::ArgValue` => `clap::PossibleValue`
* **Removed Methods**
* `App::license`
* **Removed Macros**
* `crate_license!`
* **Changed**
* `Arg::from` now differentiates between `multiple_values` and `multiple_occurrences`. If `--opt [val]...` was meant for:
- only multiple occurrences, use `[opt]... --opt [val]`
- both multiple occurrences and values, use `[opt]... --opt [val]...`
* `Arg::from(...)` will now use `multiple_occurrences` for a positional arg's `...`, rather than `multiple_values`.

#### Features

* **Added Settings**
* `AppSettings::DisableColoredHelp`
* **Added Methods**
* `App::get_color`

<a name="v3.0.0-beta.5"></a>
## v3.0.0-beta.5 (2021-10-18)
Expand All @@ -28,7 +50,7 @@ TODO: `YamlLoader`
* `App::generate_usage` => `App::render_usage`
* **Removed Settings**
* `AppSettings::DisableVersionForSubcommands` is now default behaviour
* `AppSettings::ColoredHelp`: we are now relying solely on the `color` feature flag and `App::color` method
* `AppSettings::ColoredHelp`: we are now relying solely on the `color` feature flag and `App::color` method (changed again 3.0.0-rc.0 with introduction of `AppSettings::DisableColoredHelp`)
* `AppSettings::StrictUtf8` is now default behaviour
* `AppSettings::AllowInvalidUtf8` in favor of `ArgSettings::AllowInvalidUtf8`
* `AppSettings::UnifiedHelpMessage` is now default behaviour
Expand Down Expand Up @@ -142,7 +164,7 @@ Added `unicode_help`, `env` features.
* `clap::Args` behind `derive` feature
* **Added Methods**
* **App**
* `App::license`
* `App::license` (changed again in 3.0.0-rc.0)
* **Arg**
* `Arg::get_long_about`
* `Arg::get_env`
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clap"
version = "3.0.0-beta.5"
version = "3.0.0-rc.0"
edition = "2018"
authors = [
"Kevin K. <kbknapp@gmail.com>",
Expand Down Expand Up @@ -61,7 +61,7 @@ name = "06_rustup"
path = "benches/06_rustup.rs"

[dependencies]
clap_derive = { path = "./clap_derive", version = "=3.0.0-beta.5", optional = true }
clap_derive = { path = "./clap_derive", version = "=3.0.0-rc.0", optional = true }
bitflags = "1.2"
textwrap = { version = "0.14.0", default-features = false, features = [] }
unicase = { version = "2.6", optional = true }
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ It is a simple-to-use, efficient, and full-featured library for parsing command
* [Questions & Discussions](https://github.com/clap-rs/clap/discussions)
* [Website](https://clap.rs/)

We are currently hard at work trying to release `3.0`. We have a `3.0.0-beta.5` prerelease out but we do not give any guarantees that its API is stable. We do not have a changelog yet which will be written down after we are sure about the API stability. We recommend users to not update to the prerelease version yet and to wait for the official `3.0`.
We are currently hard at work trying to release `3.0`. We have a `3.0.0-rc.0` prerelease out but we do not give any guarantees that its API is stable. We do not have a changelog yet which will be written down after we are sure about the API stability. We recommend users to not update to the prerelease version yet and to wait for the official `3.0`.

> If you're looking for the readme & examples for `clap v2.33` - find it on [github](https://github.com/clap-rs/clap/tree/v2.33.0), [crates.io](https://crates.io/crates/clap/2.33.0), [docs.rs](https://docs.rs/clap/2.33.0/clap/).

Expand Down Expand Up @@ -125,7 +125,7 @@ Add `clap` to your `Cargo.toml`

```toml
[dependencies]
clap = "3.0.0-beta.5"
clap = "3.0.0-rc.0"
```

#### Using Derive Macros
Expand Down Expand Up @@ -349,7 +349,7 @@ Simply add the `yaml` feature flag to your `Cargo.toml`.

```toml
[dependencies]
clap = { version = "3.0.0-beta.5", features = ["yaml"] }
clap = { version = "3.0.0-rc.0", features = ["yaml"] }
```

Finally we create our `main.rs` file just like we would have with the previous two examples:
Expand Down Expand Up @@ -425,7 +425,7 @@ For full usage, add `clap` as a dependency in your `Cargo.toml` to use from crat

```toml
[dependencies]
clap = "3.0.0-beta.5"
clap = "3.0.0-rc.0"
```

Define a list of valid arguments for your program (see the [documentation][docs] or [examples][examples] directory of this repo)
Expand All @@ -450,7 +450,7 @@ To disable these, add this to your `Cargo.toml`:

```toml
[dependencies.clap]
version = "3.0.0-beta.5"
version = "3.0.0-rc.0"
default-features = false
features = ["std"]
```
Expand All @@ -459,7 +459,7 @@ You can also selectively enable only the features you'd like to include, by addi

```toml
[dependencies.clap]
version = "3.0.0-beta.5"
version = "3.0.0-rc.0"
default-features = false

# Cherry-pick the features you'd like to use
Expand Down Expand Up @@ -522,7 +522,7 @@ In order to keep from being surprised of breaking changes, it is **highly** reco

```toml
[dependencies]
clap = "~3.0.0-beta.5"
clap = "~3.0.0-rc.0"
```

This will cause *only* the patch version to be updated upon a `cargo update` call, and therefore cannot break due to new features, or bumped minimum versions of Rust.
Expand Down
2 changes: 1 addition & 1 deletion clap_derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clap_derive"
version = "3.0.0-beta.5"
version = "3.0.0-rc.0"
edition = "2018"
authors = [
"Guillaume Pinot <texitoi@texitoi.eu>",
Expand Down
2 changes: 1 addition & 1 deletion clap_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// MIT/Apache 2.0 license.

#![doc(html_logo_url = "https://clap.rs/images/media/clap.png")]
#![doc(html_root_url = "https://docs.rs/clap_derive/3.0.0-beta.5")]
#![doc(html_root_url = "https://docs.rs/clap_derive/3.0.0-rc.0")]
#![doc = include_str!("../README.md")]
#![forbid(unsafe_code)]

Expand Down
6 changes: 3 additions & 3 deletions clap_generate/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clap_generate"
version = "3.0.0-beta.5"
version = "3.0.0-rc.0"
edition = "2018"
authors = [
"Kevin K. <kbknapp@gmail.com>",
Expand Down Expand Up @@ -31,12 +31,12 @@ readme = "README.md"
bench = false

[dependencies]
clap = { path = "../", version = "=3.0.0-beta.5", default-features = false, features = ["std"] }
clap = { path = "../", version = "=3.0.0-rc.0", default-features = false, features = ["std"] }

[dev-dependencies]
pretty_assertions = "0.7"
version-sync = "0.9"
clap = { path = "../", version = "=3.0.0-beta.5", default-features = false, features = ["std", "derive"] }
clap = { path = "../", version = "=3.0.0-rc.0", default-features = false, features = ["std", "derive"] }

[features]
default = []
Expand Down
2 changes: 1 addition & 1 deletion clap_generate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// for more information.

#![doc(html_logo_url = "https://clap.rs/images/media/clap.png")]
#![doc(html_root_url = "https://docs.rs/clap_generate/3.0.0-beta.5")]
#![doc(html_root_url = "https://docs.rs/clap_generate/3.0.0-rc.0")]
#![doc = include_str!("../README.md")]
#![deny(missing_docs, trivial_casts, unused_allocation, trivial_numeric_casts)]
#![forbid(unsafe_code)]
Expand Down
6 changes: 3 additions & 3 deletions clap_generate_fig/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clap_generate_fig"
version = "3.0.0-beta.5"
version = "3.0.0-rc.0"
edition = "2018"
authors = [
"Clap Maintainers"
Expand Down Expand Up @@ -31,8 +31,8 @@ readme = "README.md"
bench = false

[dependencies]
clap = { path = "../", version = "=3.0.0-beta.5", default-features = false, features = ["std"] }
clap_generate = { path = "../clap_generate", version = "=3.0.0-beta.5" }
clap = { path = "../", version = "=3.0.0-rc.0", default-features = false, features = ["std"] }
clap_generate = { path = "../clap_generate", version = "=3.0.0-rc.0" }

[dev-dependencies]
pretty_assertions = "0.7"
Expand Down
2 changes: 1 addition & 1 deletion clap_generate_fig/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//! Generates [Fig](https://github.com/withfig/autocomplete) completions for [`clap`](https://github.com/clap-rs/clap) based CLIs

#![doc(html_logo_url = "https://clap.rs/images/media/clap.png")]
#![doc(html_root_url = "https://docs.rs/clap_generate_fig/3.0.0-beta.5")]
#![doc(html_root_url = "https://docs.rs/clap_generate_fig/3.0.0-rc.0")]
#![deny(missing_docs, trivial_casts, unused_allocation, trivial_numeric_casts)]
#![forbid(unsafe_code)]
#![allow(clippy::needless_doctest_main)]
Expand Down
8 changes: 0 additions & 8 deletions src/build/arg/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ impl_settings! { ArgSettings, ArgFlags,
MultipleValues("multiplevalues") => Flags::MULTIPLE_VALS,
Multiple("multiple") => Flags::MULTIPLE,
ForbidEmptyValues("forbidemptyvalues") => Flags::NO_EMPTY_VALS,
EmptyValues("emptyvalues") => Flags::NO_OP,
Hidden("hidden") => Flags::HIDDEN,
TakesValue("takesvalue") => Flags::TAKES_VAL,
UseValueDelimiter("usevaluedelimiter") => Flags::USE_DELIM,
Expand Down Expand Up @@ -99,13 +98,6 @@ pub enum ArgSettings {
Multiple,
/// Forbids an arg from accepting empty values such as `""`
ForbidEmptyValues,
/// Deprecated, this is now the default, see [`ArgSettings::ForbidEmptyValues`] for the
/// opposite.
#[deprecated(
since = "3.0.0",
note = "This is now the default see [`ArgSettings::ForbidEmptyValues`] for the opposite."
)]
EmptyValues,
/// Hides an arg from the help message
Hidden,
/// Allows an argument to take a value (such as `--option value`)
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// notice may not be copied, modified, or distributed except according to those terms.

#![doc(html_logo_url = "https://clap.rs/images/media/clap.png")]
#![doc(html_root_url = "https://docs.rs/clap/3.0.0-beta.5")]
#![doc(html_root_url = "https://docs.rs/clap/3.0.0-rc.0")]
#![doc = include_str!("../README.md")]
//! <https://github.com/clap-rs/clap>
#![crate_type = "lib"]
Expand Down