Fix some CI (windows + nasm, core-macro error) (#2676)
* Moves index.html creation until after wasm creation so the webserver doesn't prematurely serve the page * sets up nasm for windows builds (to be superseded by Remove Dioxus CLI NASM dependency #2666 #2682) * puts magnanis-cli-support in a blocking task to prevent threadlocking during sequential builds * changes order of client/server builds such that the client is built before the server so the webserver doesn't prematurely serve invalid client code * declobbers "serve" such that each project gets a different dir in the target folder * uses nest_service instead of fallback so the router doesn't respond with fallback codes * reincorporates doge's fix from Fix hot-reloading on Windows #2544
This commit is contained in:
1 parent
40f936d56a
commit
8b5ad5d925
13 files changed
+55
-40
No files matched your search
@@ -160,15 +160,11 @@ impl ToTokens for HotLiteral {
|
||||
// But the key is what's keeping it stable
|
||||
GlobalSignal::with_key(
|
||||
|| #val, {
|
||||
concat!(
|
||||
file!(),
|
||||
":",
|
||||
line!(),
|
||||
":",
|
||||
column!(),
|
||||
":",
|
||||
#hr_idx
|
||||
)
|
||||
{
|
||||
const PATH: &str = dioxus_core::const_format::str_replace!(file!(), "\\\\", "/");
|
||||
const NORMAL: &str = dioxus_core::const_format::str_replace!(PATH, '\\', "/");
|
||||
dioxus_core::const_format::concatcp!(NORMAL, ':', line!(), ':', column!(), ':', #hr_idx)
|
||||
}
|
||||
})
|
||||
.maybe_with_rt(|s| s #mapped)
|
||||
}
|
||||
|
||||
@@ -181,22 +181,17 @@ impl ToTokens for TemplateBody {
|
||||
.iter()
|
||||
.map(|(path, idx)| self.get_dyn_attr(path, *idx).rendered_as_dynamic_attr());
|
||||
|
||||
// Rust analyzer will not autocomplete properly if we change the name every time you type a character
|
||||
// If it looks like we are running in rust analyzer, we'll just use a placeholder location
|
||||
// let looks_like_rust_analyzer = first_root_span.contains("SpanData");
|
||||
// let index = if looks_like_rust_analyzer {
|
||||
// "0".to_string()
|
||||
// } else {
|
||||
// self.template_idx.get().to_string()
|
||||
// };
|
||||
// todo: this just might be fixed?
|
||||
let index = self.template_idx.get();
|
||||
|
||||
tokens.append_all(quote! {
|
||||
dioxus_core::Element::Ok({
|
||||
#[doc(hidden)] // vscode please stop showing these in symbol search
|
||||
static ___TEMPLATE: dioxus_core::Template = dioxus_core::Template {
|
||||
name: concat!( file!(), ":", line!(), ":", column!(), ":", #index ) ,
|
||||
name: {
|
||||
const PATH: &str = dioxus_core::const_format::str_replace!(file!(), "\\\\", "/");
|
||||
const NORMAL: &str = dioxus_core::const_format::str_replace!(PATH, '\\', "/");
|
||||
dioxus_core::const_format::concatcp!(NORMAL, ':', line!(), ':', column!(), ':', #index)
|
||||
},
|
||||
roots: &[ #( #roots ),* ],
|
||||
node_paths: &[ #( #node_paths ),* ],
|
||||
attr_paths: &[ #( #attr_paths ),* ],
|
||||
|
||||
Reference in new issue
Block a user