Skip to content

Commit

Permalink
Don't force Leptos' nightly feature (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja authored Mar 13, 2024
1 parent 7924bbf commit a23af18
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 50 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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: |
Expand Down
66 changes: 26 additions & 40 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion examples/ssr-demo/src/error_template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ pub fn ErrorTemplate(
.into_iter()
.filter_map(|(_k, v)| v.downcast_ref::<AppError>().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
Expand Down
10 changes: 3 additions & 7 deletions leptos_hotkeys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit a23af18

Please sign in to comment.