From 284a724e5fd80786eaed0f90123b9dabcff8102a Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Sat, 22 Feb 2025 07:35:09 -0500 Subject: [PATCH 1/5] chore(ci): update pinned nightly version --- .github/workflows/ci-semver.yml | 4 ++-- .github/workflows/ci.yml | 2 +- leptos_macro/Makefile.toml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-semver.yml b/.github/workflows/ci-semver.yml index 6df81b4c3e..e577c414e1 100644 --- a/.github/workflows/ci-semver.yml +++ b/.github/workflows/ci-semver.yml @@ -18,7 +18,7 @@ jobs: test: needs: [get-leptos-changed] if: needs.get-leptos-changed.outputs.leptos_changed == 'true' && github.event.pull_request.labels[0].name != 'breaking' - name: Run semver check (nightly-2024-08-01) + name: Run semver check (nightly-2025-02-19) runs-on: ubuntu-latest steps: - name: Install Glib @@ -30,4 +30,4 @@ jobs: - name: Semver Checks uses: obi1kenobi/cargo-semver-checks-action@v2 with: - rust-toolchain: nightly-2024-08-01 + rust-toolchain: nightly-2025-02-19 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 171f80a37f..967483ded1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,4 +26,4 @@ jobs: with: directory: ${{ matrix.directory }} cargo_make_task: "ci" - toolchain: nightly-2024-08-01 + toolchain: nightly-2025-02-19 diff --git a/leptos_macro/Makefile.toml b/leptos_macro/Makefile.toml index 9c63e0899e..a2d1550340 100644 --- a/leptos_macro/Makefile.toml +++ b/leptos_macro/Makefile.toml @@ -11,13 +11,13 @@ dependencies = [ [tasks.test-leptos_macro-example] description = "Tests the leptos_macro/example to check if macro handles doc comments correctly" command = "cargo" -args = ["+nightly-2024-08-01", "test", "--doc"] +args = ["+nightly-2025-02-19", "test", "--doc"] cwd = "example" install_crate = false [tasks.doc-leptos_macro-example] description = "Docs the leptos_macro/example to check if macro handles doc comments correctly" command = "cargo" -args = ["+nightly-2024-08-01", "doc"] +args = ["+nightly-2025-02-19", "doc"] cwd = "example" install_crate = false From 362c300eac75ba10be88bb25f3afc7dc1fd99d20 Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Sat, 22 Feb 2025 08:28:26 -0500 Subject: [PATCH 2/5] chore: clippy doc comment indentation --- reactive_graph/src/lib.rs | 8 ++++---- server_fn/server_fn_macro_default/src/lib.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/reactive_graph/src/lib.rs b/reactive_graph/src/lib.rs index 91eb1701f7..73b02bec9a 100644 --- a/reactive_graph/src/lib.rs +++ b/reactive_graph/src/lib.rs @@ -48,10 +48,10 @@ //! //! ## Design Principles and Assumptions //! - **Effects are expensive.** The library is built on the assumption that the side effects -//! (making a network request, rendering something to the DOM, writing to disk) are orders of -//! magnitude more expensive than propagating signal updates. As a result, the algorithm is -//! designed to avoid re-running side effects unnecessarily, and is willing to sacrifice a small -//! amount of raw update speed to that goal. +//! (making a network request, rendering something to the DOM, writing to disk) are orders of +//! magnitude more expensive than propagating signal updates. As a result, the algorithm is +//! designed to avoid re-running side effects unnecessarily, and is willing to sacrifice a small +//! amount of raw update speed to that goal. //! - **Automatic dependency tracking.** Dependencies are not specified as a compile-time list, but //! tracked at runtime. This in turn enables **dynamic dependency tracking**: subscribers //! unsubscribe from their sources between runs, which means that a subscriber that contains a diff --git a/server_fn/server_fn_macro_default/src/lib.rs b/server_fn/server_fn_macro_default/src/lib.rs index 2d15987057..4806744043 100644 --- a/server_fn/server_fn_macro_default/src/lib.rs +++ b/server_fn/server_fn_macro_default/src/lib.rs @@ -28,7 +28,7 @@ use syn::__private::ToTokens; /// /// You can any combination of the following named arguments: /// - `name`: sets the identifier for the server function’s type, which is a struct created -/// to hold the arguments (defaults to the function identifier in PascalCase) +/// to hold the arguments (defaults to the function identifier in PascalCase) /// - `prefix`: a prefix at which the server function handler will be mounted (defaults to `/api`) /// - `endpoint`: specifies the exact path at which the server function handler will be mounted, /// relative to the prefix (defaults to the function name followed by unique hash) From ddd243d07ad65c8dd0e81d9a1f37bc32badfe581 Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Sat, 22 Feb 2025 08:38:39 -0500 Subject: [PATCH 3/5] chore: better way of not running whole doc tests --- integrations/actix/src/lib.rs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/integrations/actix/src/lib.rs b/integrations/actix/src/lib.rs index bdf9d61a9d..c0bb96e408 100644 --- a/integrations/actix/src/lib.rs +++ b/integrations/actix/src/lib.rs @@ -274,14 +274,13 @@ pub fn redirect(path: &str) { /// /// This can then be set up at an appropriate route in your application: /// -/// ``` +/// ```no_run /// use actix_web::*; /// /// fn register_server_functions() { /// // call ServerFn::register() for each of the server functions you've defined /// } /// -/// # if false { // don't actually try to run a server in a doctest... /// #[actix_web::main] /// async fn main() -> std::io::Result<()> { /// // make sure you actually register your server functions @@ -297,7 +296,6 @@ pub fn redirect(path: &str) { /// .run() /// .await /// } -/// # } /// ``` /// /// ## Provided Context Types @@ -433,7 +431,7 @@ pub fn handle_server_fns_with_context( /// but requires some client-side JavaScript. /// /// This can then be set up at an appropriate route in your application: -/// ``` +/// ```no_run /// use actix_web::{App, HttpServer}; /// use leptos::prelude::*; /// use leptos_router::Method; @@ -444,7 +442,6 @@ pub fn handle_server_fns_with_context( /// view! {
"Hello, world!"
} /// } /// -/// # if false { // don't actually try to run a server in a doctest... /// #[actix_web::main] /// async fn main() -> std::io::Result<()> { /// let conf = get_configuration(Some("Cargo.toml")).unwrap(); @@ -464,7 +461,6 @@ pub fn handle_server_fns_with_context( /// .run() /// .await /// } -/// # } /// ``` /// /// ## Provided Context Types @@ -492,7 +488,7 @@ where /// sending down its HTML. The app will become interactive once it has fully loaded. /// /// This can then be set up at an appropriate route in your application: -/// ``` +/// ```no_run /// use actix_web::{App, HttpServer}; /// use leptos::prelude::*; /// use leptos_router::Method; @@ -503,7 +499,6 @@ where /// view! {
"Hello, world!"
} /// } /// -/// # if false { // don't actually try to run a server in a doctest... /// #[actix_web::main] /// async fn main() -> std::io::Result<()> { /// let conf = get_configuration(Some("Cargo.toml")).unwrap(); @@ -526,7 +521,6 @@ where /// .run() /// .await /// } -/// # } /// ``` /// /// ## Provided Context Types @@ -552,7 +546,7 @@ where /// `async` resources have loaded. /// /// This can then be set up at an appropriate route in your application: -/// ``` +/// ```no_run /// use actix_web::{App, HttpServer}; /// use leptos::prelude::*; /// use leptos_router::Method; @@ -563,7 +557,6 @@ where /// view! {
"Hello, world!"
} /// } /// -/// # if false { // don't actually try to run a server in a doctest... /// #[actix_web::main] /// async fn main() -> std::io::Result<()> { /// let conf = get_configuration(Some("Cargo.toml")).unwrap(); @@ -583,7 +576,6 @@ where /// .run() /// .await /// } -/// # } /// ``` /// /// ## Provided Context Types From 885f4a16548f645ab87337a01e3489d533854635 Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Sat, 22 Feb 2025 08:39:00 -0500 Subject: [PATCH 4/5] chore: ignore type complexity lint --- integrations/axum/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/integrations/axum/src/lib.rs b/integrations/axum/src/lib.rs index 485edd5f4b..9e04e1d90a 100644 --- a/integrations/axum/src/lib.rs +++ b/integrations/axum/src/lib.rs @@ -1,5 +1,6 @@ #![forbid(unsafe_code)] #![deny(missing_docs)] +#![allow(clippy::type_complexity)] //! Provides functions to easily integrate Leptos with Axum. //! From 5bc254d49faa571f96f6d66c83e3f0fb8604a7e1 Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Sat, 22 Feb 2025 14:29:25 -0500 Subject: [PATCH 5/5] chore: better way of not running whole doc tests --- integrations/axum/src/lib.rs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/integrations/axum/src/lib.rs b/integrations/axum/src/lib.rs index 9e04e1d90a..40c3420aa9 100644 --- a/integrations/axum/src/lib.rs +++ b/integrations/axum/src/lib.rs @@ -279,12 +279,11 @@ pub fn generate_request_and_parts( /// /// This can then be set up at an appropriate route in your application: /// -/// ``` +/// ```no_run /// use axum::{handler::Handler, routing::post, Router}; /// use leptos::prelude::*; /// use std::net::SocketAddr; /// -/// # if false { // don't actually try to run a server in a doctest... /// #[cfg(feature = "default")] /// #[tokio::main] /// async fn main() { @@ -300,7 +299,6 @@ pub fn generate_request_and_parts( /// .await /// .unwrap(); /// } -/// # } /// ``` /// Leptos provides a generic implementation of `handle_server_fns`. If access to more specific parts of the Request is desired, /// you can specify your own server fn handler based on this one and give it it's own route in the server macro. @@ -443,7 +441,7 @@ pub type PinnedHtmlStream = /// to route it using [leptos_router], serving an HTML stream of your application. /// /// This can then be set up at an appropriate route in your application: -/// ``` +/// ```no_run /// use axum::{handler::Handler, Router}; /// use leptos::{config::get_configuration, prelude::*}; /// use std::{env, net::SocketAddr}; @@ -453,7 +451,6 @@ pub type PinnedHtmlStream = /// view! {
"Hello, world!"
} /// } /// -/// # if false { // don't actually try to run a server in a doctest... /// #[cfg(feature = "default")] /// #[tokio::main] /// async fn main() { @@ -472,7 +469,6 @@ pub type PinnedHtmlStream = /// .await /// .unwrap(); /// } -/// # } /// ``` /// /// ## Provided Context Types @@ -531,7 +527,7 @@ where /// sending down its HTML. The app will become interactive once it has fully loaded. /// /// This can then be set up at an appropriate route in your application: -/// ``` +/// ```no_run /// use axum::{handler::Handler, Router}; /// use leptos::{config::get_configuration, prelude::*}; /// use std::{env, net::SocketAddr}; @@ -541,7 +537,6 @@ where /// view! {
"Hello, world!"
} /// } /// -/// # if false { // don't actually try to run a server in a doctest... /// #[cfg(feature = "default")] /// #[tokio::main] /// async fn main() { @@ -560,7 +555,6 @@ where /// .await /// .unwrap(); /// } -/// # } /// ``` /// /// ## Provided Context Types @@ -938,7 +932,7 @@ fn provide_contexts( /// `async` resources have loaded. /// /// This can then be set up at an appropriate route in your application: -/// ``` +/// ```no_run /// use axum::{handler::Handler, Router}; /// use leptos::{config::get_configuration, prelude::*}; /// use std::{env, net::SocketAddr}; @@ -948,7 +942,6 @@ fn provide_contexts( /// view! {
"Hello, world!"
} /// } /// -/// # if false { // don't actually try to run a server in a doctest... /// #[cfg(feature = "default")] /// #[tokio::main] /// async fn main() { @@ -968,7 +961,6 @@ fn provide_contexts( /// .await /// .unwrap(); /// } -/// # } /// ``` /// /// ## Provided Context Types