From 7a994eb95b0fa447e95d7d28a020fd30143b87b6 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sun, 22 Jul 2018 15:47:31 +0100 Subject: Work around conflicting dependencies for actix-web and rocket --- .travis.yml | 2 +- testing/Cargo.toml | 13 +++++++------ testing/tests/actix_web.rs | 1 + testing/tests/rocket.rs | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index b223b97..d79163f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,4 +12,4 @@ matrix: - rustup component add rustfmt-preview - rustup component add clippy-preview script: - - cargo test --all-features + - cd testing && cargo test --no-default-features --features with-rocket diff --git a/testing/Cargo.toml b/testing/Cargo.toml index 6223673..7c93783 100644 --- a/testing/Cargo.toml +++ b/testing/Cargo.toml @@ -5,13 +5,14 @@ authors = ["Dirkjan Ochtman "] workspace = ".." [features] -default = [] -nightly = ["rocket", "rocket_codegen", "askama/with-rocket"] +default = ["actix"] +with-rocket = ["rocket", "rocket_codegen", "askama/with-rocket"] +actix = ["actix-web", "bytes", "askama/with-actix-web"] [dependencies] -actix-web = "0.7" -askama = { path = "../askama", version = "*", features = ["with-actix-web", "with-iron", "serde-json"] } -bytes = "0.4" +actix-web = { version = "0.7", optional = true } +askama = { path = "../askama", version = "*", features = ["with-iron", "serde-json"] } +bytes = { version = "0.4", optional = true } criterion = "0.2" iron = "0.6" rocket = { version = "0.3", optional = true } @@ -19,7 +20,7 @@ rocket_codegen = { version = "0.3", optional = true } serde_json = "1.0" [build-dependencies] -askama = { path = "../askama", version = "*", features = ["with-actix-web", "with-iron", "serde-json"] } +askama = { path = "../askama", version = "*", features = ["with-iron", "serde-json"] } [[bench]] name = "all" diff --git a/testing/tests/actix_web.rs b/testing/tests/actix_web.rs index 12724d9..e2d8bcf 100644 --- a/testing/tests/actix_web.rs +++ b/testing/tests/actix_web.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "actix")] #[macro_use] extern crate askama; extern crate actix_web; diff --git a/testing/tests/rocket.rs b/testing/tests/rocket.rs index c613311..2bf4713 100644 --- a/testing/tests/rocket.rs +++ b/testing/tests/rocket.rs @@ -1,4 +1,4 @@ -#![cfg(feature = "rocket")] +#![cfg(feature = "with-rocket")] #![feature(plugin)] #![plugin(rocket_codegen)] -- cgit