Keep dummies in default features for convenience. (#1212)

This commit is contained in:
Andrés N. Robalino 2020-01-13 01:17:56 -05:00 committed by GitHub
parent 2f039b3abc
commit 29fd8b55fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 18 additions and 10 deletions

View file

@ -42,16 +42,16 @@ steps:
echo "##vso[task.prependpath]$HOME/.cargo/bin" echo "##vso[task.prependpath]$HOME/.cargo/bin"
rustup component add rustfmt --toolchain "stable" rustup component add rustfmt --toolchain "stable"
displayName: Install Rust displayName: Install Rust
- bash: RUSTFLAGS="-D warnings" cargo test --all --features=stable,nu-dummies - bash: RUSTFLAGS="-D warnings" cargo test --all --features=stable
condition: eq(variables['style'], 'unflagged') condition: eq(variables['style'], 'unflagged')
displayName: Run tests displayName: Run tests
- bash: RUSTFLAGS="-D warnings" cargo clippy --all --features=stable,nu-dummies -- -D clippy::result_unwrap_used -D clippy::option_unwrap_used - bash: RUSTFLAGS="-D warnings" cargo clippy --all --features=stable -- -D clippy::result_unwrap_used -D clippy::option_unwrap_used
condition: eq(variables['style'], 'unflagged') condition: eq(variables['style'], 'unflagged')
displayName: Check clippy lints displayName: Check clippy lints
- bash: NUSHELL_ENABLE_ALL_FLAGS=1 RUSTFLAGS="-D warnings" cargo test --all --features=stable,nu-dummies - bash: NUSHELL_ENABLE_ALL_FLAGS=1 RUSTFLAGS="-D warnings" cargo test --all --features=stable
condition: eq(variables['style'], 'canary') condition: eq(variables['style'], 'canary')
displayName: Run tests displayName: Run tests
- bash: NUSHELL_ENABLE_ALL_FLAGS=1 RUSTFLAGS="-D warnings" cargo clippy --all --features=stable,nu-dummies -- -D clippy::result_unwrap_used -D clippy::option_unwrap_used - bash: NUSHELL_ENABLE_ALL_FLAGS=1 RUSTFLAGS="-D warnings" cargo clippy --all --features=stable -- -D clippy::result_unwrap_used -D clippy::option_unwrap_used
condition: eq(variables['style'], 'canary') condition: eq(variables['style'], 'canary')
displayName: Check clippy lints displayName: Check clippy lints
- bash: cargo fmt --all -- --check - bash: cargo fmt --all -- --check

1
Cargo.lock generated
View file

@ -2346,6 +2346,7 @@ dependencies = [
"dunce", "dunce",
"getset", "getset",
"glob", "glob",
"nu-build",
"tempfile", "tempfile",
] ]

View file

@ -139,11 +139,12 @@ url = {version = "2.1.0", optional = true}
users = "0.9" users = "0.9"
[features] [features]
default = ["sys", "ps", "textview", "inc", "str"] # Dummy executables
stable = ["sys", "ps", "textview", "inc", "str", "starship-prompt", "binaryview", "match", "tree", "average", "sum", "post", "fetch", "clipboard"]
nu-dummies = [] nu-dummies = []
default = ["nu-dummies", "sys", "ps", "textview", "inc", "str"]
stable = ["default", "starship-prompt", "binaryview", "match", "tree", "average", "sum", "post", "fetch", "clipboard"]
# Default # Default
sys = ["heim", "battery"] sys = ["heim", "battery"]
ps = ["heim", "futures-timer"] ps = ["heim", "futures-timer"]
@ -182,17 +183,17 @@ path = "src/lib.rs"
[[bin]] [[bin]]
name = "fail" name = "fail"
path = "crates/nu-test-support/src/bin/fail.rs" path = "crates/nu-test-support/src/dummies/fail.rs"
required-features = ["nu-dummies"] required-features = ["nu-dummies"]
[[bin]] [[bin]]
name = "chop" name = "chop"
path = "crates/nu-test-support/src/bin/chop.rs" path = "crates/nu-test-support/src/dummies/chop.rs"
required-features = ["nu-dummies"] required-features = ["nu-dummies"]
[[bin]] [[bin]]
name = "cococo" name = "cococo"
path = "crates/nu-test-support/src/bin/cococo.rs" path = "crates/nu-test-support/src/dummies/cococo.rs"
required-features = ["nu-dummies"] required-features = ["nu-dummies"]
# Core plugins that ship with `cargo install nu` by default # Core plugins that ship with `cargo install nu` by default

View file

@ -15,3 +15,6 @@ dunce = "1.0.0"
getset = "0.0.9" getset = "0.0.9"
glob = "0.3.0" glob = "0.3.0"
tempfile = "3.1.0" tempfile = "3.1.0"
[build-dependencies]
nu-build = { version = "0.8.0", path = "../nu-build" }

View file

@ -0,0 +1,3 @@
fn main() -> Result<(), Box<dyn std::error::Error>> {
nu_build::build()
}