mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
Remove unstable feature flag
This commit is contained in:
parent
7442de7d9a
commit
49954c28ad
9 changed files with 17 additions and 19 deletions
|
@ -34,5 +34,5 @@ stages:
|
|||
displayName: Install rust
|
||||
- script: cargo test --no-default-features --features "std cargo" -p clap:3.0.0-beta.2
|
||||
displayName: Test with almost no features
|
||||
- script: cargo test --features "yaml unstable"
|
||||
- script: cargo test --features "yaml"
|
||||
displayName: Test with most features
|
||||
|
|
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
|
@ -76,7 +76,9 @@ jobs:
|
|||
uses: actions/checkout@v2
|
||||
- name: Install linker
|
||||
if: matrix.target == 'i686-unknown-linux-gnu'
|
||||
run: sudo apt-get install gcc-multilib
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc-multilib
|
||||
- name: Test almost no features
|
||||
uses: actions-rs/cargo@v1
|
||||
if: matrix.features == 'none'
|
||||
|
@ -88,19 +90,19 @@ jobs:
|
|||
if: matrix.features == 'all'
|
||||
with:
|
||||
command: test
|
||||
args: --target ${{ matrix.target }} --features "wrap_help yaml regex unstable"
|
||||
args: --target ${{ matrix.target }} --features "wrap_help yaml regex"
|
||||
- name: Check debug statement
|
||||
uses: actions-rs/cargo@v1
|
||||
if: matrix.features == 'all'
|
||||
with:
|
||||
command: check
|
||||
args: --target ${{ matrix.target }} --features "wrap_help yaml regex unstable debug"
|
||||
args: --target ${{ matrix.target }} --features "wrap_help yaml regex debug"
|
||||
- name: Test release
|
||||
uses: actions-rs/cargo@v1
|
||||
if: matrix.features == 'release'
|
||||
with:
|
||||
command: test
|
||||
args: --target ${{ matrix.target }} --features "wrap_help yaml regex unstable" --release
|
||||
args: --target ${{ matrix.target }} --features "wrap_help yaml regex" --release
|
||||
nightly:
|
||||
name: Nightly Tests
|
||||
needs: [prepare]
|
||||
|
@ -123,7 +125,7 @@ jobs:
|
|||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --features "wrap_help yaml regex unstable"
|
||||
args: --features "wrap_help yaml regex"
|
||||
wasm:
|
||||
name: Wasm Check
|
||||
needs: [prepare]
|
||||
|
@ -145,7 +147,7 @@ jobs:
|
|||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: check
|
||||
args: --target ${{ matrix.target }} --features "yaml regex unstable"
|
||||
args: --target ${{ matrix.target }} --features "yaml regex"
|
||||
lint:
|
||||
name: Linting (fmt + clippy)
|
||||
needs: [prepare]
|
||||
|
@ -169,7 +171,7 @@ jobs:
|
|||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
args: --features "wrap_help yaml regex unstable" -- -D warnings
|
||||
args: --features "wrap_help yaml regex" -- -D warnings
|
||||
- name: Format check
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
|
@ -199,7 +201,7 @@ jobs:
|
|||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: tarpaulin
|
||||
args: --features "wrap_help yaml regex unstable" --timeout 300 --out Lcov --output-dir coverage
|
||||
args: --features "wrap_help yaml regex" --timeout 300 --out Lcov --output-dir coverage
|
||||
- name: Coveralls
|
||||
uses: coverallsapp/github-action@master
|
||||
with:
|
||||
|
|
|
@ -9,7 +9,7 @@ Another really great way to help is if you find an interesting, or helpful way i
|
|||
To test with all features both enabled and disabled, you can run these commands:
|
||||
|
||||
```sh
|
||||
$ cargo test --features "wrap_help yaml regex unstable"
|
||||
$ cargo test --features "wrap_help yaml regex"
|
||||
```
|
||||
|
||||
Alternatively, if you have [`just`](https://github.com/casey/just) installed you can run the prebuilt recipes. *Not* using `just` is perfectly fine as well, it simply bundles commands automatically.
|
||||
|
@ -39,7 +39,7 @@ During the CI process `clap` runs against many different lints using [`clippy`](
|
|||
In order to check the code for lints and to format it run either:
|
||||
|
||||
```sh
|
||||
$ cargo clippy --features "wrap_help yaml regex unstable" -- -D warnings
|
||||
$ cargo clippy --features "wrap_help yaml regex" -- -D warnings
|
||||
$ cargo fmt -- --check
|
||||
|
||||
# Or
|
||||
|
@ -84,7 +84,7 @@ I use a [conventional](https://github.com/ajoslin/conventional-changelog/blob/a5
|
|||
### Tests and Documentation
|
||||
|
||||
1. Create tests for your changes
|
||||
2. **Ensure the tests are passing.** Run the tests (`cargo test --features "yaml unstable"`), alternatively `just run-tests` if you have `just` installed.
|
||||
2. **Ensure the tests are passing.** Run the tests (`cargo test --features "yaml"`), alternatively `just run-tests` if you have `just` installed.
|
||||
3. **Optional** Run the lints (`cargo build --features lints`) (requires a nightly compiler), alternatively `just lint`
|
||||
4. Ensure your changes contain documentation if adding new APIs or features.
|
||||
|
||||
|
|
|
@ -95,7 +95,6 @@ unicode_help= ["textwrap/unicode-width"] # Enable if any unicode in help messag
|
|||
derive = ["clap_derive", "lazy_static"]
|
||||
yaml = ["yaml-rust"]
|
||||
cargo = ["lazy_static"] # Disable if you're not using Cargo, enables Cargo-env-var-dependent macros
|
||||
unstable = ["clap_derive/unstable"] # for building with unstable clap features (doesn't require nightly Rust) (currently none)
|
||||
debug = ["clap_derive/debug"] # Enables debug messages
|
||||
doc = ["yaml", "regex"] # All the features which add to documentation
|
||||
|
||||
|
|
|
@ -491,7 +491,6 @@ features = [ "suggestions", "color" ]
|
|||
* **"wrap_help"**: Turns on the help text wrapping feature, based on the terminal size. (builds dependency `term-size`)
|
||||
* **"yaml"**: Enables building CLIs from YAML documents. (builds dependency `yaml-rust`)
|
||||
* **"regex"**: Enables regex validators. (builds dependency `regex`)
|
||||
* **"unstable"**: Enables unstable `clap` features that may change from release to release
|
||||
|
||||
### More Information
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ version-sync = "0.9"
|
|||
|
||||
[features]
|
||||
default = []
|
||||
unstable = []
|
||||
debug = []
|
||||
doc = []
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@ version-sync = "0.9"
|
|||
|
||||
[features]
|
||||
default = []
|
||||
unstable = ["clap/unstable"]
|
||||
debug = ["clap/debug"]
|
||||
doc = []
|
||||
|
||||
|
|
4
justfile
4
justfile
|
@ -5,7 +5,7 @@ debug TESTG TEST="":
|
|||
cargo test --test {{TESTG}} --features debug -- {{TEST}}
|
||||
|
||||
run-tests:
|
||||
cargo test --features "wrap_help yaml regex unstable"
|
||||
cargo test --features "wrap_help yaml regex"
|
||||
|
||||
@bench:
|
||||
cargo bench
|
||||
|
@ -13,7 +13,7 @@ run-tests:
|
|||
@lint:
|
||||
rustup component add clippy
|
||||
rustup component add rustfmt
|
||||
cargo clippy --features "wrap_help yaml regex unstable" -- -D warnings
|
||||
cargo clippy --features "wrap_help yaml regex" -- -D warnings
|
||||
cargo fmt -- --check
|
||||
|
||||
clean:
|
||||
|
|
|
@ -10,7 +10,7 @@ fn run_example<S: AsRef<str>>(name: S, args: &[&str]) -> Output {
|
|||
"--example",
|
||||
name.as_ref(),
|
||||
"--features",
|
||||
"yaml unstable",
|
||||
"yaml",
|
||||
"--",
|
||||
];
|
||||
all_args.extend_from_slice(args);
|
||||
|
|
Loading…
Reference in a new issue