cli json output, dx bundle fix, dx serve --platform android, race condition, drop ssg platform (#3186)

* clean up logging to avoid random extra trace

* fix race condition with updates

* properly wire up verbose

* fix bundling (macos) and logging

* Add structured output

* clean up clap names

* extract out wire format

* switch structured key to json

* fix random println, fallback to `dioxus/platform`

* clean up logging for run/build

* clean up logging around project

* remove manual exits

* fix tokio runtime for mobile

* rework dog app

* rip out ssg

* Switch dioxus/axum to dioxus/server

* add android template inline

* pre restructure for bundle prep

* add the whole res directory

* Better theme for the app

* remove mobile demo now that most apps work natively

* self-referential android

* only use deep linking for assets

* fix imports for android

* clippy, fixup ios and android

* I'm not boxing compiler message you can't make me

* fix clippy on unix
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2024-11-12 09:01:01 -05:00
1 parent 8a998e7d49
commit ac3e33af46
116 files changed
+2367 -6091

No files matched your search

+15 -7
View File
@@ -204,7 +204,11 @@ impl WebServer {
}
/// Sends an updated build status to all clients.
pub(crate) async fn new_build_update(&mut self, update: &BuildUpdate) {
pub(crate) async fn new_build_update(
&mut self,
update: &BuildUpdate,
builder: &super::Builder,
) {
match update {
BuildUpdate::Progress { stage } => {
// Todo(miles): wire up more messages into the splash screen UI
@@ -220,11 +224,13 @@ impl WebServer {
krate,
..
} => {
self.build_status.set(Status::Building {
progress: (*current as f64 / *total as f64).clamp(0.0, 1.0),
build_message: format!("{krate} compiling"),
});
self.send_build_status().await;
if !builder.is_finished() {
self.build_status.set(Status::Building {
progress: (*current as f64 / *total as f64).clamp(0.0, 1.0),
build_message: format!("{krate} compiling"),
});
self.send_build_status().await;
}
}
BuildStage::OptimizingWasm {} => {}
BuildStage::Aborted => {}
@@ -250,7 +256,7 @@ impl WebServer {
return;
}
tracing::debug!("Sending hotreload to clients {:?}", reload);
tracing::trace!("Sending hotreload to clients {:?}", reload);
let msg = DevserverMsg::HotReload(reload);
let msg = serde_json::to_string(&msg).unwrap();
@@ -281,6 +287,8 @@ impl WebServer {
/// Tells all clients to reload if possible for new changes.
pub(crate) async fn send_reload_command(&mut self) {
tracing::trace!("Sending reload to toast");
tokio::time::sleep(std::time::Duration::from_millis(500)).await;
self.build_status.set(Status::Ready);