codify "platform" into resolution logic, server-fn/fullstack overhaul (#4596)
overhaul dioxus fullstack using a new implementation of server_fn This PR is a complete rewrite of dioxus fullstack designed to improve compatibility with axum and to fix a number of compilation errors based on feature flag unification plumbing through macros.
This commit is contained in:
1 parent
8421c3aef0
commit
f2b1c6d97f
424 files changed
+17284
-6624
No files matched your search
@@ -16,6 +16,23 @@ impl ExprNode {
|
||||
|
||||
impl Parse for ExprNode {
|
||||
fn parse(input: syn::parse::ParseStream) -> syn::Result<Self> {
|
||||
// // If it's a single-line expression, we want to parse it without braces, fixing some issues with rust 2024 lifetimes
|
||||
// use syn::braced;
|
||||
// let forked = input.fork();
|
||||
// if forked.peek(syn::token::Brace) {
|
||||
// let content;
|
||||
// let _brace = braced!(content in forked);
|
||||
// let as_expr: Result<syn::Expr, syn::Error> = content.parse();
|
||||
// if as_expr.is_ok() && content.is_empty() {
|
||||
// let content;
|
||||
// let _brace = braced!(content in input);
|
||||
// return Ok(Self {
|
||||
// expr: content.parse()?,
|
||||
// dyn_idx: DynIdx::default(),
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
Ok(Self {
|
||||
expr: input.parse()?,
|
||||
dyn_idx: DynIdx::default(),
|
||||
|
||||
@@ -149,6 +149,8 @@ impl ToTokens for TemplateBody {
|
||||
}
|
||||
#[cfg(debug_assertions)]
|
||||
let __template_read = {
|
||||
use dioxus_signals::ReadableExt;
|
||||
|
||||
static __NORMALIZED_FILE: &'static str = {
|
||||
const PATH: &str = dioxus_core::const_format::str_replace!(file!(), "\\\\", "/");
|
||||
dioxus_core::const_format::str_replace!(PATH, '\\', "/")
|
||||
@@ -156,7 +158,7 @@ impl ToTokens for TemplateBody {
|
||||
|
||||
// The key is important here - we're creating a new GlobalSignal each call to this
|
||||
// But the key is what's keeping it stable
|
||||
static __TEMPLATE: GlobalSignal<Option<dioxus_core::internal::HotReloadedTemplate>> = GlobalSignal::with_location(
|
||||
static __TEMPLATE: dioxus_signals::GlobalSignal<Option<dioxus_core::internal::HotReloadedTemplate>> = dioxus_signals::GlobalSignal::with_location(
|
||||
|| None::<dioxus_core::internal::HotReloadedTemplate>,
|
||||
__NORMALIZED_FILE,
|
||||
line!(),
|
||||
|
||||
Reference in new issue
Block a user