You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running static generation is a race condition between a 10 second timer and the site actually rendering. This caused the docsite build to silently fail and deploy the broken site
Steps To Reproduce
Steps to reproduce the behavior:
Create a new project with this code:
// [dependencies]// dioxus = { version = "0.6.0", features = ["fullstack", "router"] }// tokio = { version = "1.42.0", features = ["full"], optional = true }// tracing = "0.1.41"// [features]// default = []// web = ["dioxus/web"]// server = ["dioxus/server", "dep:tokio"]use dioxus::prelude::*;fnmain(){LaunchBuilder::new().with_cfg(server_only!{ServeConfig::builder().incremental(IncrementalRendererConfig::new().static_dir(std::path::PathBuf::from("./docs")).clear_cache(false)).build().expect("Unable to build ServeConfig")}).launch(|| {rsx!{Router<Route> {}}})}#[derive(Routable,Clone,PartialEq,Eq,Hash)]enumRoute{#[route("/")]Home,#[route("/other_route")]OtherRoute,}fnHome() -> Element{use_server_future(pause)?;rsx!{
div {
h1 {"Hello, world!"}}}}fnOtherRoute() -> Element{rsx!{
div {
h1 {"Hello, world!"}}}}#[server]asyncfnpause() -> Result<(),ServerFnError>{
tokio::time::sleep(std::time::Duration::from_secs(60)).await;Ok(())}#[server(endpoint = "static_routes")]asyncfnstatic_routes() -> Result<Vec<String>,ServerFnError>{Ok(Route::static_routes().into_iter().map(|route| route.to_string()).collect::<Vec<_>>())}
Run dx build --ssg
Observe the generated site has no content
Expected behavior
SSG should not silently fail to build when it takes more than 10 seconds
Environment:
Dioxus version: 0.6
Rust version: nightly
OS info: MacOS
App platform: ssg
The text was updated successfully, but these errors were encountered:
Problem
Running static generation is a race condition between a 10 second timer and the site actually rendering. This caused the docsite build to silently fail and deploy the broken site
Steps To Reproduce
Steps to reproduce the behavior:
dx build --ssg
Expected behavior
SSG should not silently fail to build when it takes more than 10 seconds
Environment:
0.6
nightly
ssg
The text was updated successfully, but these errors were encountered: