diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11b964a..e786562 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: ~/.cargo/registry ~/.cargo/git target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/Makefile.toml') }} - name: Install cargo-make run: cargo binstall -y cargo-make env: @@ -78,7 +78,7 @@ jobs: ~/.cargo/registry ~/.cargo/git target - key: ${{ runner.os }}-cargo-${{ matrix.example }}-${{ matrix.builder }}-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-cargo-${{ matrix.example }}-${{ matrix.builder }}-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/Makefile.toml') }} - name: Build with trunk if: ${{ matrix.builder == 'trunk' }} run: | diff --git a/Makefile.toml b/Makefile.toml index 413875b..6be6ee7 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -10,51 +10,37 @@ description = "Lint Rust code" run_task = { name = ["clippy", "cargo-check", "format-check"] } [tasks.clippy] -clear = true description = "Run clippy" -run_task = { name = [ - "clippy-no-features", - "clippy-debug", - "clippy-ssr" -] } - -# TODO: Remove ["-W", "clippy::empty-docs"] when the next issue is resolved: -# https://github.com/leptos-rs/leptos/issues/2406 -[tasks.clippy-no-features] -install_crate = "clippy" -command = "cargo" -args = ["clippy", "--", "-Dwarnings", "-A", "clippy::empty-docs"] - -[tasks.clippy-debug] -install_crate = "clippy" -command = "cargo" -args = ["clippy", "--features=debug", "--", "-Dwarnings", "-A", "clippy::empty-docs"] - -[tasks.clippy-ssr] -install_crate = "clippy" +clear = true +install_crate = "cargo-hack" command = "cargo" -args = ["clippy", "--features=ssr", "--", "-Dwarnings", "-A", "clippy::empty-docs"] +# TODO: Remove ["-A", "clippy::empty-docs"] when the next issue is resolved: +# https://github.com/leptos-rs/leptos/issues/2406 +args = [ + "hack", + "clippy", + "--all", + "--each-feature", + "--no-dev-deps", + "--", + "-A", + "clippy::empty-docs", + "-D", + "clippy::print_stdout" +] [tasks.cargo-check] -clear = true description = "Run cargo-check" -run_task = { name = [ - "cargo-check-no-features", - "cargo-check-debug", - "cargo-check-ssr" -] } - -[tasks.cargo-check-no-features] -command = "cargo" -args = ["check"] - -[tasks.cargo-check-debug] -command = "cargo" -args = ["check", "--features=debug"] - -[tasks.cargo-check-ssr] -command = "cargo" -args = ["check", "--features=ssr"] +clear = true +install_crate = "cargo-hack" +command = "cargo" +args = [ + "hack", + "check", + "--all", + "--each-feature", + "--no-dev-deps", +] [tasks.format-check] description = "Check Rust code formatting with rustfmt" diff --git a/examples/ssr-demo/src/error_template.rs b/examples/ssr-demo/src/error_template.rs index 511bd6e..cb05319 100644 --- a/examples/ssr-demo/src/error_template.rs +++ b/examples/ssr-demo/src/error_template.rs @@ -38,7 +38,10 @@ pub fn ErrorTemplate( .into_iter() .filter_map(|(_k, v)| v.downcast_ref::().cloned()) .collect(); - println!("Errors: {errors:#?}"); + #[allow(clippy::print_stdout)] + { + println!("Errors: {errors:#?}"); + } // Only the response code for the first error is actually sent from the server // this may be customized by the specific application diff --git a/leptos_hotkeys/Cargo.toml b/leptos_hotkeys/Cargo.toml index df7c73b..6b7d2bd 100644 --- a/leptos_hotkeys/Cargo.toml +++ b/leptos_hotkeys/Cargo.toml @@ -6,18 +6,14 @@ description = "A library that declaratively pairs keybindings with callbacks for license = "MIT" repository = "http://github.com/friendlymatthew/leptos-hotkeys" readme = "README.md" -authors = ["Matthew Kim", "Alvaro Mondejar", "Robert Junkins"] +authors = ["Matthew Kim", "Álvaro Mondéjar Rubio", "Robert Junkins"] keywords = ["leptos", "hotkeys", "wasm"] [dependencies] -leptos = { version = "0.6", features = ["nightly"] } +leptos = "0.6" log = { version = "0.4", optional = true } wasm-bindgen = "0.2" -web-sys = { version = "0.3" } - -[lib] -name = "leptos_hotkeys" -path = "src/lib.rs" +web-sys = "0.3" [features] debug = ["dep:log"]