From 8bc4fd4198325c73448a1b6d9651e78f9c259b77 Mon Sep 17 00:00:00 2001 From: Saber Haj Rabiee Date: Mon, 7 Apr 2025 08:57:01 -0700 Subject: [PATCH] Introducing `cargo all-features clippy|nextest` part of build process (#3767) * fix: intoducing cargo all-features clippy * fix: change check to clippy for better diagnostics * chore: build is redundant * fix: lint task * feat: speed up tests by 2x with cargo-nextest * fix: re-add flags * fix: router example build process * fix: correct clippy arguments * fix: adapt examples makefile to new tools * fix(CI): add cargo-all-features part of CI dep * fix: just warn if there is no tests * fix(CI): add clippy and rustfmt components * fix: nextest in examples * fix: clippy should not run on empty set of features in examples (quickfix) * fix: pin cargo-all-features installation to a branch * fix: nextest --no-tests=warn? * fix: do not use built-in cargo-make workflows * fix: remove --all-targets * fix: do not run tests in parallel in certain examples * fix: disable nextest for examples * fix: properly override the make task * chore: run tests with no-deps * fix: hackernews_islands_axum * fix(CI): properly use --no-deps * fix(CI): --no-deps is not supported in tests * fix(CI): run doctests separately due to stable rust limitation in nextest * fix(examples): makefile lint recursion * fix(CI): run tests correctly * fix: remove unused clear in test makefile * fix: --no-deps positional arg in clippy * fix: run doctests for all-features * fix: running cargo-all-features over doctests * fix: improve playwright makefile --- .github/workflows/run-cargo-make-task.yml | 5 ++++ Makefile.toml | 4 ++-- cargo-make/check.toml | 7 ------ cargo-make/lint.toml | 16 +++++++------ cargo-make/main.toml | 8 ++----- cargo-make/test.toml | 21 ++++++++++++----- examples/axum_js_ssr/Cargo.toml | 2 +- .../cargo-make/cargo-leptos-compress.toml | 14 ++++------- examples/cargo-make/cargo-leptos.toml | 13 +++++++---- examples/cargo-make/compile.toml | 14 +++++------ examples/cargo-make/deno-build.toml | 13 +++++++---- examples/cargo-make/lint.toml | 15 ++++++++---- examples/cargo-make/main.toml | 15 +++++------- .../cargo-make/playwright-trunk-test.toml | 20 +++------------- examples/cargo-make/trunk_server.toml | 5 ++-- examples/counter_isomorphic/Cargo.toml | 2 +- examples/counter_without_macros/Makefile.toml | 8 +++---- examples/errors_axum/Cargo.toml | 2 +- examples/hackernews/Cargo.toml | 2 +- examples/hackernews_axum/Cargo.toml | 2 +- examples/hackernews_islands_axum/Cargo.toml | 3 ++- .../hackernews_islands_axum/Makefile.toml | 14 ++++++++--- .../hackernews_islands_axum/src/fallback.rs | 3 ++- examples/hackernews_js_fetch/Cargo.toml | 2 +- examples/islands/Cargo.toml | 2 +- examples/islands_router/Cargo.toml | 2 +- examples/js-framework-benchmark/Makefile.toml | 23 ++++++++++--------- examples/server_fns_axum/Cargo.toml | 2 +- examples/ssr_modes/Cargo.toml | 2 +- examples/ssr_modes_axum/Cargo.toml | 2 +- examples/static_routing/Cargo.toml | 2 +- examples/suspense_tests/e2e/Makefile.toml | 16 ++++++------- examples/tailwind_actix/Cargo.toml | 2 +- examples/tailwind_axum/Cargo.toml | 2 +- examples/todo_app_sqlite/Cargo.toml | 2 +- examples/todo_app_sqlite/e2e/Makefile.toml | 16 ++++++------- examples/todo_app_sqlite_axum/Cargo.toml | 2 +- .../todo_app_sqlite_axum/e2e/Makefile.toml | 16 ++++++------- examples/todo_app_sqlite_csr/Cargo.toml | 2 +- .../todo_app_sqlite_csr/e2e/Makefile.toml | 16 ++++++------- examples/todomvc/Cargo.toml | 2 +- leptos/Makefile.toml | 2 +- leptos_macro/Makefile.toml | 2 +- 43 files changed, 168 insertions(+), 157 deletions(-) delete mode 100644 cargo-make/check.toml diff --git a/.github/workflows/run-cargo-make-task.yml b/.github/workflows/run-cargo-make-task.yml index 99280ad0c..04f78d085 100644 --- a/.github/workflows/run-cargo-make-task.yml +++ b/.github/workflows/run-cargo-make-task.yml @@ -59,6 +59,7 @@ jobs: with: toolchain: ${{ matrix.toolchain }} targets: wasm32-unknown-unknown + components: clippy,rustfmt - name: Install binstall uses: cargo-bins/cargo-binstall@main - name: Install wasm-bindgen @@ -67,6 +68,10 @@ jobs: run: cargo binstall cargo-leptos --locked --no-confirm - name: Install cargo-make run: cargo binstall cargo-make --no-confirm + - name: Install nextest + run: cargo binstall cargo-nextest --no-confirm + - name: Install cargo-all-features + run: cargo install --git https://github.com/sabify/cargo-all-features --branch arbitrary-command-support - name: Install Trunk if: contains(inputs.directory, 'examples') run: cargo binstall trunk --no-confirm diff --git a/Makefile.toml b/Makefile.toml index b9e3d9a6e..e03ecea6a 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -10,8 +10,8 @@ CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true workspace = false clear = true dependencies = [ - { name = "check", path = "examples/counter_without_macros" }, - { name = "check", path = "examples/counters_stable" }, + { name = "lint", path = "examples/counter_without_macros" }, + { name = "lint", path = "examples/counters_stable" }, ] [tasks.ci-examples] diff --git a/cargo-make/check.toml b/cargo-make/check.toml deleted file mode 100644 index 769e783f2..000000000 --- a/cargo-make/check.toml +++ /dev/null @@ -1,7 +0,0 @@ -[tasks.check] -alias = "check-all" - -[tasks.check-all] -command = "cargo" -args = ["check-all-features"] -install_crate = "cargo-all-features" diff --git a/cargo-make/lint.toml b/cargo-make/lint.toml index 36154091c..a707d0cc9 100644 --- a/cargo-make/lint.toml +++ b/cargo-make/lint.toml @@ -6,13 +6,15 @@ env = { LEPTOS_PROJECT_DIRECTORY = "../" } args = ["fmt", "--", "--check", "--config-path", "${LEPTOS_PROJECT_DIRECTORY}"] [tasks.clippy-each-feature] -dependencies = ["install-clippy"] command = "cargo" args = [ - "clippy", - "--all-features", - "--no-deps", - "--", - "-D", - "clippy::print_stdout", + "all-features", + "clippy", + "--no-deps", + "--", + "-D", + "clippy::print_stdout", ] +install_script = ''' +cargo install --git https://github.com/sabify/cargo-all-features --branch arbitrary-command-support +''' diff --git a/cargo-make/main.toml b/cargo-make/main.toml index 7487fe6d2..8e961fd7b 100644 --- a/cargo-make/main.toml +++ b/cargo-make/main.toml @@ -1,8 +1,4 @@ -extend = [ - { path = "./check.toml" }, - { path = "./lint.toml" }, - { path = "./test.toml" }, -] +extend = [{ path = "./lint.toml" }, { path = "./test.toml" }] [env] RUSTFLAGS = "" @@ -12,4 +8,4 @@ LEPTOS_OUTPUT_NAME = "ci" # allows examples to check/build without cargo-leptos RUSTFLAGS = "-D warnings" [tasks.ci] -dependencies = ["lint", "test-flow"] +dependencies = ["lint", "test-each-feature", "doctests"] diff --git a/cargo-make/test.toml b/cargo-make/test.toml index e464d641d..1d68295b5 100644 --- a/cargo-make/test.toml +++ b/cargo-make/test.toml @@ -1,7 +1,16 @@ -[tasks.test] -alias = "test-all" - -[tasks.test-all] +[tasks.test-each-feature] +env = { "NEXTEST_NO_TESTS" = "warn" } command = "cargo" -args = ["test-all-features"] -install_crate = "cargo-all-features" +args = ["all-features", "nextest", "run", "--all-targets"] +install_script = ''' +cargo install --git https://github.com/sabify/cargo-all-features --branch arbitrary-command-support +''' + +# This can be removed once doctests is supported in nextest +# https://github.com/nextest-rs/nextest/issues/16 +[tasks.doctests] +command = "cargo" +args = ["all-features", "test", "--doc"] +install_script = ''' +cargo install --git https://github.com/sabify/cargo-all-features --branch arbitrary-command-support +''' diff --git a/examples/axum_js_ssr/Cargo.toml b/examples/axum_js_ssr/Cargo.toml index 60a8c8d01..5d141fc02 100644 --- a/examples/axum_js_ssr/Cargo.toml +++ b/examples/axum_js_ssr/Cargo.toml @@ -65,7 +65,7 @@ panic = "abort" [package.metadata.cargo-all-features] denylist = ["axum", "tower", "tower-http", "tokio", "sqlx", "leptos_axum"] -skip_feature_sets = [["ssr", "hydrate"]] +skip_feature_sets = [["ssr", "hydrate"], []] [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/cargo-make/cargo-leptos-compress.toml b/examples/cargo-make/cargo-leptos-compress.toml index c0a965602..707d72887 100644 --- a/examples/cargo-make/cargo-leptos-compress.toml +++ b/examples/cargo-make/cargo-leptos-compress.toml @@ -1,5 +1,3 @@ -extend = [{ path = "./lint.toml" }] - [tasks.make-target-site-dir] command = "mkdir" args = ["-p", "target/site"] @@ -22,20 +20,16 @@ clear = true dependencies = ["check-debug", "check-release"] [tasks.check-debug] +dependencies = ["cargo-all-features"] command = "cargo" -args = ["check-all-features"] -install_crate = "cargo-all-features" +args = ["all-features", "clippy"] [tasks.check-release] +dependencies = ["cargo-all-features"] command = "cargo" -args = ["check-all-features", "--release"] -install_crate = "cargo-all-features" - -[tasks.lint] -dependencies = ["make-target-site-dir", "check-style"] +args = ["all-features", "clippy", "--release"] [tasks.start-client] dependencies = ["install-cargo-leptos"] command = "cargo" args = ["leptos", "watch", "--release", "-P"] - diff --git a/examples/cargo-make/cargo-leptos.toml b/examples/cargo-make/cargo-leptos.toml index 786fd9f90..9a44b0b57 100644 --- a/examples/cargo-make/cargo-leptos.toml +++ b/examples/cargo-make/cargo-leptos.toml @@ -1,3 +1,8 @@ +[tasks.cargo-all-features] +install_script = ''' +cargo install --git https://github.com/sabify/cargo-all-features --branch arbitrary-command-support +''' + [tasks.install-cargo-leptos] install_crate = { crate_name = "cargo-leptos", binary = "cargo-leptos", test_arg = "--help" } args = ["--locked"] @@ -16,14 +21,14 @@ clear = true dependencies = ["check-debug", "check-release"] [tasks.check-debug] +dependencies = ["cargo-all-features"] command = "cargo" -args = ["check-all-features"] -install_crate = "cargo-all-features" +args = ["all-features", "clippy"] [tasks.check-release] +dependencies = ["cargo-all-features"] command = "cargo" -args = ["check-all-features", "--release"] -install_crate = "cargo-all-features" +args = ["all-features", "clippy", "--release"] [tasks.start-client] dependencies = ["install-cargo-leptos"] diff --git a/examples/cargo-make/compile.toml b/examples/cargo-make/compile.toml index 64790407e..d7a960e4f 100644 --- a/examples/cargo-make/compile.toml +++ b/examples/cargo-make/compile.toml @@ -1,9 +1,9 @@ -[tasks.build] -command = "cargo" -args = ["build-all-features"] -install_crate = "cargo-all-features" +[tasks.cargo-all-features] +install_script = ''' +cargo install --git https://github.com/sabify/cargo-all-features --branch arbitrary-command-support +''' -[tasks.check] +[tasks.build] +dependencies = ["cargo-all-features"] command = "cargo" -args = ["check-all-features"] -install_crate = "cargo-all-features" +args = ["all-features", "build"] diff --git a/examples/cargo-make/deno-build.toml b/examples/cargo-make/deno-build.toml index 7119b58aa..68c15b4bb 100644 --- a/examples/cargo-make/deno-build.toml +++ b/examples/cargo-make/deno-build.toml @@ -1,3 +1,8 @@ +[tasks.cargo-all-features] +install_script = ''' +cargo install --git https://github.com/sabify/cargo-all-features --branch arbitrary-command-support +''' + [tasks.build] install_crate = { crate_name = "wasm-pack", binary = "wasm-pack", test_arg = "--help" } clear = true @@ -14,11 +19,11 @@ clear = true dependencies = ["check-debug", "check-release"] [tasks.check-debug] +dependencies = ["cargo-all-features"] command = "cargo" -args = ["check-all-features"] -install_crate = "cargo-all-features" +args = ["all-features", "clippy"] [tasks.check-release] +dependencies = ["cargo-all-features"] command = "cargo" -args = ["check-all-features", "--release"] -install_crate = "cargo-all-features" +args = ["all-features", "clippy", "--release"] diff --git a/examples/cargo-make/lint.toml b/examples/cargo-make/lint.toml index 5e0c8e825..44d5d7bdb 100644 --- a/examples/cargo-make/lint.toml +++ b/examples/cargo-make/lint.toml @@ -1,8 +1,15 @@ -[tasks.pre-clippy] -env = { CARGO_MAKE_CLIPPY_ARGS = "--no-deps --all-targets --all-features -- -D warnings" } +[tasks.cargo-all-features] +install_script = ''' +cargo install --git https://github.com/sabify/cargo-all-features --branch arbitrary-command-support +''' -[tasks.check-style] -dependencies = ["check-format-flow", "clippy-flow"] +[tasks.lint] +dependencies = ["check-format-flow", "clippy-each-feature"] + +[tasks.clippy-each-feature] +dependencies = ["cargo-all-features"] +command = "cargo" +args = ["all-features", "clippy", "--no-deps", "--", "-D", "warnings"] [tasks.check-format] env = { LEPTOS_PROJECT_DIRECTORY = "../../" } diff --git a/examples/cargo-make/main.toml b/examples/cargo-make/main.toml index 0e6fdae04..3c1ac4986 100644 --- a/examples/cargo-make/main.toml +++ b/examples/cargo-make/main.toml @@ -1,22 +1,19 @@ extend = [ - { path = "./compile.toml" }, - { path = "./clean.toml" }, - { path = "./lint.toml" }, - { path = "./node.toml" }, - { path = "./process.toml" }, + { path = "./compile.toml" }, + { path = "./clean.toml" }, + { path = "./lint.toml" }, + { path = "./node.toml" }, + { path = "./process.toml" }, ] # CI Stages [tasks.ci] -dependencies = ["prepare", "lint", "build", "test-flow", "integration-test"] +dependencies = ["prepare", "lint", "test-flow", "integration-test"] [tasks.prepare] dependencies = ["setup-node"] -[tasks.lint] -dependencies = ["check-style"] - [tasks.integration-test] # Support Local Runs diff --git a/examples/cargo-make/playwright-trunk-test.toml b/examples/cargo-make/playwright-trunk-test.toml index 707f6fb8e..c7f23438a 100644 --- a/examples/cargo-make/playwright-trunk-test.toml +++ b/examples/cargo-make/playwright-trunk-test.toml @@ -1,22 +1,8 @@ extend = [ - { path = "../cargo-make/playwright.toml" }, - { path = "../cargo-make/trunk_server.toml" }, + { path = "../cargo-make/playwright.toml" }, + { path = "../cargo-make/trunk_server.toml" }, ] [tasks.integration-test] +dependencies = ["build", "start-client", "test-playwright"] description = "Run integration test with automated start and stop of processes" -env = { SPAWN_CLIENT_PROCESS = "1" } -run_task = { name = ["start", "wait-test-stop"], parallel = true } - -[tasks.wait-test-stop] -private = true -dependencies = ["wait-server", "test-playwright", "stop"] - -[tasks.wait-server] -script = ''' -for run in {1..12}; do - echo "Waiting to ensure server is started..." - sleep 10 -done -echo "Times up, running tests" -''' diff --git a/examples/cargo-make/trunk_server.toml b/examples/cargo-make/trunk_server.toml index c0f844cac..ba444c7e8 100644 --- a/examples/cargo-make/trunk_server.toml +++ b/examples/cargo-make/trunk_server.toml @@ -6,5 +6,6 @@ command = "trunk" args = ["build"] [tasks.start-client] -command = "trunk" -args = ["serve", "${@}"] +script = ''' +trunk serve -q "${@}" & +''' diff --git a/examples/counter_isomorphic/Cargo.toml b/examples/counter_isomorphic/Cargo.toml index c25809989..b82e581e0 100644 --- a/examples/counter_isomorphic/Cargo.toml +++ b/examples/counter_isomorphic/Cargo.toml @@ -44,7 +44,7 @@ ssr = [ [package.metadata.cargo-all-features] denylist = ["actix-files", "actix-web", "leptos_actix"] -skip_feature_sets = [["ssr", "hydrate"]] +skip_feature_sets = [["ssr", "hydrate"], []] [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/counter_without_macros/Makefile.toml b/examples/counter_without_macros/Makefile.toml index 9a36d935d..7f8215206 100644 --- a/examples/counter_without_macros/Makefile.toml +++ b/examples/counter_without_macros/Makefile.toml @@ -5,11 +5,11 @@ extend = [ ] [tasks.build] +dependencies = ["cargo-all-features"] command = "cargo" -args = ["build-all-features"] -install_crate = "cargo-all-features" +args = ["all-features", "build"] [tasks.check] +dependencies = ["cargo-all-features"] command = "cargo" -args = ["check-all-features"] -install_crate = "cargo-all-features" +args = ["all-features", "clippy"] diff --git a/examples/errors_axum/Cargo.toml b/examples/errors_axum/Cargo.toml index a18068cac..99ddf1cc3 100644 --- a/examples/errors_axum/Cargo.toml +++ b/examples/errors_axum/Cargo.toml @@ -36,7 +36,7 @@ ssr = [ [package.metadata.cargo-all-features] denylist = ["axum", "tower", "tower-http", "tokio", "leptos_axum"] -skip_feature_sets = [["ssr", "hydrate"]] +skip_feature_sets = [["ssr", "hydrate"], []] [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/hackernews/Cargo.toml b/examples/hackernews/Cargo.toml index 58ed6caae..69f9fc9da 100644 --- a/examples/hackernews/Cargo.toml +++ b/examples/hackernews/Cargo.toml @@ -43,7 +43,7 @@ codegen-units = 1 [package.metadata.cargo-all-features] denylist = ["actix-files", "actix-web", "leptos_actix"] -skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"]] +skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"], []] [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/hackernews_axum/Cargo.toml b/examples/hackernews_axum/Cargo.toml index 482fac193..d3343d356 100644 --- a/examples/hackernews_axum/Cargo.toml +++ b/examples/hackernews_axum/Cargo.toml @@ -47,7 +47,7 @@ ssr = [ [package.metadata.cargo-all-features] denylist = ["axum", "tower", "tower-http", "tokio", "http", "leptos_axum"] -skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"]] +skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"], []] [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/hackernews_islands_axum/Cargo.toml b/examples/hackernews_islands_axum/Cargo.toml index 90314b360..cf35523c4 100644 --- a/examples/hackernews_islands_axum/Cargo.toml +++ b/examples/hackernews_islands_axum/Cargo.toml @@ -57,7 +57,8 @@ ssr = [ [package.metadata.cargo-all-features] denylist = ["axum", "tower", "tower-http", "tokio", "http", "leptos_axum"] -skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"]] +skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"], []] +max_combination_size = 2 [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/hackernews_islands_axum/Makefile.toml b/examples/hackernews_islands_axum/Makefile.toml index 8644b57b8..cf408eb28 100644 --- a/examples/hackernews_islands_axum/Makefile.toml +++ b/examples/hackernews_islands_axum/Makefile.toml @@ -1,8 +1,16 @@ extend = [ - { path = "../cargo-make/main.toml" }, - { path = "../cargo-make/cargo-leptos-compress.toml" }, + { path = "../cargo-make/main.toml" }, + { path = "../cargo-make/cargo-leptos-compress.toml" }, +] + +[tasks.ci] +dependencies = [ + "prepare", + "make-target-site-dir", + "lint", + "test-flow", + "integration-test", ] [env] - CLIENT_PROCESS_NAME = "hackernews_islands" diff --git a/examples/hackernews_islands_axum/src/fallback.rs b/examples/hackernews_islands_axum/src/fallback.rs index da295169c..110ec8cb8 100644 --- a/examples/hackernews_islands_axum/src/fallback.rs +++ b/examples/hackernews_islands_axum/src/fallback.rs @@ -3,6 +3,7 @@ use axum::{ http::{header, Request, Response, StatusCode, Uri}, response::{IntoResponse, Response as AxumResponse}, }; +use rust_embed::Embed; use std::borrow::Cow; #[cfg(not(debug_assertions))] @@ -11,7 +12,7 @@ const DEV_MODE: bool = false; #[cfg(debug_assertions)] const DEV_MODE: bool = true; -#[derive(rust_embed::RustEmbed)] +#[derive(Embed)] #[folder = "target/site/"] struct Assets; diff --git a/examples/hackernews_js_fetch/Cargo.toml b/examples/hackernews_js_fetch/Cargo.toml index 68b3b96b2..ba2675d64 100644 --- a/examples/hackernews_js_fetch/Cargo.toml +++ b/examples/hackernews_js_fetch/Cargo.toml @@ -57,7 +57,7 @@ ssr = [ [package.metadata.cargo-all-features] denylist = ["axum", "tower", "http", "leptos_axum"] -skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"]] +skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"], []] [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/islands/Cargo.toml b/examples/islands/Cargo.toml index c05e0d3e7..4c565292b 100644 --- a/examples/islands/Cargo.toml +++ b/examples/islands/Cargo.toml @@ -41,7 +41,7 @@ panic = "abort" [package.metadata.cargo-all-features] denylist = ["axum", "tower", "tower-http", "tokio", "sqlx", "leptos_axum"] -skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"]] +skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"], []] [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/islands_router/Cargo.toml b/examples/islands_router/Cargo.toml index 7acfcc573..f700dbd1d 100644 --- a/examples/islands_router/Cargo.toml +++ b/examples/islands_router/Cargo.toml @@ -45,7 +45,7 @@ panic = "abort" [package.metadata.cargo-all-features] denylist = ["axum", "tower", "tower-http", "tokio", "sqlx", "leptos_axum"] -skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"]] +skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"], []] [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/js-framework-benchmark/Makefile.toml b/examples/js-framework-benchmark/Makefile.toml index c5fb02386..93ee1f278 100644 --- a/examples/js-framework-benchmark/Makefile.toml +++ b/examples/js-framework-benchmark/Makefile.toml @@ -4,15 +4,16 @@ extend = [ { path = "../cargo-make/trunk_server.toml" }, ] -[tasks.build] +[tasks.clippy-each-feature] +dependencies = ["cargo-all-features"] command = "cargo" -args = ["build-all-features", "--target", "wasm32-unknown-unknown"] -install_crate = "cargo-all-features" - -[tasks.check] -command = "cargo" -args = ["check-all-features", "--target", "wasm32-unknown-unknown"] -install_crate = "cargo-all-features" - -[tasks.pre-clippy] -env = { CARGO_MAKE_CLIPPY_ARGS = "--all-targets --all-features --target wasm32-unknown-unknown -- -D warnings" } +args = [ + "all-features", + "clippy", + "--target", + "wasm32-unknown-unknown", + "--no-deps", + "--", + "-D", + "warnings", +] diff --git a/examples/server_fns_axum/Cargo.toml b/examples/server_fns_axum/Cargo.toml index f3923a672..03cb31243 100644 --- a/examples/server_fns_axum/Cargo.toml +++ b/examples/server_fns_axum/Cargo.toml @@ -60,7 +60,7 @@ ssr = [ [package.metadata.cargo-all-features] denylist = ["axum", "tower", "tower-http", "tokio", "leptos_axum"] -skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"]] +skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"], []] [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/ssr_modes/Cargo.toml b/examples/ssr_modes/Cargo.toml index b1ab577a5..6ebeac47e 100644 --- a/examples/ssr_modes/Cargo.toml +++ b/examples/ssr_modes/Cargo.toml @@ -36,7 +36,7 @@ ssr = [ [package.metadata.cargo-all-features] denylist = ["actix-files", "actix-web", "leptos_actix"] -skip_feature_sets = [["ssr", "hydrate"]] +skip_feature_sets = [["ssr", "hydrate"], []] [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/ssr_modes_axum/Cargo.toml b/examples/ssr_modes_axum/Cargo.toml index 2fc413005..65dc919be 100644 --- a/examples/ssr_modes_axum/Cargo.toml +++ b/examples/ssr_modes_axum/Cargo.toml @@ -55,7 +55,7 @@ panic = "abort" [package.metadata.cargo-all-features] denylist = ["axum", "tower", "tower-http", "tokio", "sqlx", "leptos_axum"] -skip_feature_sets = [["ssr", "hydrate"]] +skip_feature_sets = [["ssr", "hydrate"], []] [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/static_routing/Cargo.toml b/examples/static_routing/Cargo.toml index 6c642011e..f3d70fb0a 100644 --- a/examples/static_routing/Cargo.toml +++ b/examples/static_routing/Cargo.toml @@ -60,7 +60,7 @@ panic = "abort" [package.metadata.cargo-all-features] denylist = ["axum", "tower", "tower-http", "tokio", "sqlx", "leptos_axum"] -skip_feature_sets = [["ssr", "hydrate"]] +skip_feature_sets = [["ssr", "hydrate"], []] [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/suspense_tests/e2e/Makefile.toml b/examples/suspense_tests/e2e/Makefile.toml index cd76be24d..172931e96 100644 --- a/examples/suspense_tests/e2e/Makefile.toml +++ b/examples/suspense_tests/e2e/Makefile.toml @@ -9,12 +9,12 @@ condition = { env_true = ["RUN_AUTOMATICALLY"] } [tasks.test-ui] command = "cargo" args = [ - "test", - "--test", - "app_suite", - "--", - "--retry", - "2", - "--fail-fast", - "${@}", + "test", + "--test", + "app_suite", + "--", + "--retry", + "2", + "--fail-fast", + "${@}", ] diff --git a/examples/tailwind_actix/Cargo.toml b/examples/tailwind_actix/Cargo.toml index 06cd441d5..ed5733d3e 100644 --- a/examples/tailwind_actix/Cargo.toml +++ b/examples/tailwind_actix/Cargo.toml @@ -39,7 +39,7 @@ denylist = [ "leptos_actix", "wasm-bindgen", ] -skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"]] +skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"], []] [profile.release] codegen-units = 1 diff --git a/examples/tailwind_axum/Cargo.toml b/examples/tailwind_axum/Cargo.toml index 418bb03f7..f84cd6724 100644 --- a/examples/tailwind_axum/Cargo.toml +++ b/examples/tailwind_axum/Cargo.toml @@ -40,7 +40,7 @@ ssr = [ [package.metadata.cargo-all-features] denylist = ["axum", "tokio", "tower", "tower-http", "leptos_axum"] -skip_feature_sets = [["ssr", "hydrate"]] +skip_feature_sets = [["ssr", "hydrate"], []] [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/todo_app_sqlite/Cargo.toml b/examples/todo_app_sqlite/Cargo.toml index fa1d858eb..ed316639a 100644 --- a/examples/todo_app_sqlite/Cargo.toml +++ b/examples/todo_app_sqlite/Cargo.toml @@ -41,7 +41,7 @@ ssr = [ [package.metadata.cargo-all-features] denylist = ["actix-files", "actix-web", "leptos_actix", "sqlx"] -skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"]] +skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"], []] [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/todo_app_sqlite/e2e/Makefile.toml b/examples/todo_app_sqlite/e2e/Makefile.toml index cd76be24d..172931e96 100644 --- a/examples/todo_app_sqlite/e2e/Makefile.toml +++ b/examples/todo_app_sqlite/e2e/Makefile.toml @@ -9,12 +9,12 @@ condition = { env_true = ["RUN_AUTOMATICALLY"] } [tasks.test-ui] command = "cargo" args = [ - "test", - "--test", - "app_suite", - "--", - "--retry", - "2", - "--fail-fast", - "${@}", + "test", + "--test", + "app_suite", + "--", + "--retry", + "2", + "--fail-fast", + "${@}", ] diff --git a/examples/todo_app_sqlite_axum/Cargo.toml b/examples/todo_app_sqlite_axum/Cargo.toml index f9c754b97..e8154b683 100644 --- a/examples/todo_app_sqlite_axum/Cargo.toml +++ b/examples/todo_app_sqlite_axum/Cargo.toml @@ -41,7 +41,7 @@ ssr = [ [package.metadata.cargo-all-features] denylist = ["axum", "tower", "tower-http", "tokio", "sqlx", "leptos_axum"] -skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"]] +skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"], []] [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/todo_app_sqlite_axum/e2e/Makefile.toml b/examples/todo_app_sqlite_axum/e2e/Makefile.toml index cd76be24d..172931e96 100644 --- a/examples/todo_app_sqlite_axum/e2e/Makefile.toml +++ b/examples/todo_app_sqlite_axum/e2e/Makefile.toml @@ -9,12 +9,12 @@ condition = { env_true = ["RUN_AUTOMATICALLY"] } [tasks.test-ui] command = "cargo" args = [ - "test", - "--test", - "app_suite", - "--", - "--retry", - "2", - "--fail-fast", - "${@}", + "test", + "--test", + "app_suite", + "--", + "--retry", + "2", + "--fail-fast", + "${@}", ] diff --git a/examples/todo_app_sqlite_csr/Cargo.toml b/examples/todo_app_sqlite_csr/Cargo.toml index c6b59d5c6..f0e06a795 100644 --- a/examples/todo_app_sqlite_csr/Cargo.toml +++ b/examples/todo_app_sqlite_csr/Cargo.toml @@ -44,7 +44,7 @@ ssr = [ [package.metadata.cargo-all-features] denylist = ["axum", "tower", "tower-http", "tokio", "sqlx", "leptos_axum"] -skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"]] +skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"], []] [package.metadata.leptos] # The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name diff --git a/examples/todo_app_sqlite_csr/e2e/Makefile.toml b/examples/todo_app_sqlite_csr/e2e/Makefile.toml index 2d384dbcd..88560553f 100644 --- a/examples/todo_app_sqlite_csr/e2e/Makefile.toml +++ b/examples/todo_app_sqlite_csr/e2e/Makefile.toml @@ -9,12 +9,12 @@ condition = { env_true = ["RUN_AUTOMATICALLY"] } [tasks.test-ui] command = "cargo" args = [ - "test", - "--test", - "app_suite", - "--", - "--retry", - "5", - "--fail-fast", - "${@}", + "test", + "--test", + "app_suite", + "--", + "--retry", + "5", + "--fail-fast", + "${@}", ] diff --git a/examples/todomvc/Cargo.toml b/examples/todomvc/Cargo.toml index 488044070..3a972795a 100644 --- a/examples/todomvc/Cargo.toml +++ b/examples/todomvc/Cargo.toml @@ -19,4 +19,4 @@ web-sys = { version = "0.3.70", features = ["Storage"] } wasm-bindgen-test = "0.3.42" [package.metadata.cargo-all-features] -skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"]] +skip_feature_sets = [["csr", "ssr"], ["csr", "hydrate"], ["ssr", "hydrate"], []] diff --git a/leptos/Makefile.toml b/leptos/Makefile.toml index 7dfacad4a..c51471bbe 100644 --- a/leptos/Makefile.toml +++ b/leptos/Makefile.toml @@ -3,7 +3,7 @@ extend = { path = "../cargo-make/main.toml" } [tasks.check] clear = true dependencies = [ - "check-all", + "clippy-each-feature", "check-wasm", "check-release", "check-wasm-release", diff --git a/leptos_macro/Makefile.toml b/leptos_macro/Makefile.toml index d9c694416..0c406deb9 100644 --- a/leptos_macro/Makefile.toml +++ b/leptos_macro/Makefile.toml @@ -3,7 +3,7 @@ extend = { path = "../cargo-make/main.toml" } [tasks.test] clear = true dependencies = [ - "test-all", + "test-each-feature", "test-leptos_macro-example", "doc-leptos_macro-example", ]