Skip to content

Commit

Permalink
feat: Turn serde into a default feature.
Browse files Browse the repository at this point in the history
This is actually more of a workaround that I don't mind.  There isn't a
low maintenance way to enable a feature for tests.  I misunderstood
cargo's documentation and thought I could add a `[[test]]` section but
that instead disabled all the tests.

Fixes #128
  • Loading branch information
epage committed Jul 17, 2017
1 parent 986553a commit 6be99f1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ script:
- cargo -V
- cargo check --verbose
- cargo check --verbose --features "cli"
- cargo check --verbose --features "cli serde serde_yaml serde_json"
- cargo test --verbose --features "cli serde serde_yaml serde_json"
- cargo check --verbose --features "cli serde_yaml serde_json"
- cargo test --verbose --features "cli serde_yaml serde_json"
- ! which cargo-clippy || cargo when --channel nightly clippy -- --version
- ! which cargo-clippy || cargo when --channel nightly clippy --features "cli serde serde_yaml serde_json"
- cargo when --channel nightly bench --features "cli serde serde_yaml serde_json"
- ! which cargo-clippy || cargo when --channel nightly clippy --features "cli serde_yaml serde_json"
- cargo when --channel nightly bench --features "cli serde_yaml serde_json"
- cargo when --channel stable doc --no-deps --all-features
- cargo when --channel stable fmt -- --version
- cargo when --channel stable fmt -- --write-mode=diff
Expand Down
7 changes: 2 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,8 @@ doctest = false
bench = false
doc = false

[[test]]
name = "liquid"
required-features = ["serde"]

[features]
default = ["extra-filters"]
default = ["extra-filters", "serde"]
cli = ["clap", "error-chain", "serde_yaml"]
extra-filters = []
dev = []
Expand All @@ -50,6 +46,7 @@ serde_json = { version = "1.0", optional = true }

[build-dependencies]
skeptic = "0.9"
serde = { version = "1.0", features = ["derive"] }

[dev-dependencies]
difference = "1.0"
Expand Down
1 change: 0 additions & 1 deletion tests/liquid.rs

This file was deleted.

0 comments on commit 6be99f1

Please sign in to comment.