final 0.7 fixes: xcode 15/16 hybrid, auto openssldir for android, include_*! tracking hotpatch, fix /assets/ brick at high opt levels, windows linker file, etc (#4376)

* wip: openssl autodetection

* add voltaile read inside of asset fn

* support xcode 15 for --device

* vendor openssl on android

* Smaller width TUI

* switch to anyhow for the entire CLI

* add backtrace and print double printing of cargo_metadata errors

* add some padding to multi-line anyhow error

* check semvers

* don't open if not interactive

* set the tailwind current_dir so it doesn't twitch

* get the oboe demo working

* copy the c++ library on android

* cleanup env vars

* add depinfo watcher

* fix stale hotpatches and crate count

* add musl support

* remove outdated autofmt test

* update scanner app

* add hotdog app and bundle to ci

* upload dx on every branch

* collapse mobile into desktop

* `dx doctor` command

* windows command files

* no pipe on doctor

* fix ci?

* fix links

* fix ci

* use main instead of nightly

* bump node

* build cli for host

* cargo doc

* prep dog_app for bundle

* package hotdog

* no bundle or nightly cli

* comment out nightly cli

* add quotes to linker files
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2025-07-14 12:54:15 -07:00
1 parent 97947b169b
commit 727752a965
78 files changed
+2270 -817

No files matched your search

+40 -17
View File
@@ -1,10 +1,10 @@
use super::{AppBuilder, ServeUpdate, WebServer};
use crate::{
platform_override::CommandWithPlatformOverrides, BuildArtifacts, BuildId, BuildMode,
BuildTargets, BuilderUpdate, Error, HotpatchModuleCache, Platform, Result, ServeArgs,
TailwindCli, TraceSrc, Workspace,
BuildTargets, BuilderUpdate, HotpatchModuleCache, Platform, Result, ServeArgs, TailwindCli,
TraceSrc, Workspace,
};
use anyhow::Context;
use anyhow::{bail, Context};
use dioxus_core::internal::{
HotReloadTemplateWithLocation, HotReloadedTemplate, TemplateGlobalKey,
};
@@ -92,7 +92,7 @@ pub(crate) struct CachedFile {
impl AppServer {
/// Create the AppRunner and then initialize the filemap with the crate directory.
pub(crate) async fn start(args: ServeArgs) -> Result<Self> {
pub(crate) async fn new(args: ServeArgs) -> Result<Self> {
let workspace = Workspace::current().await?;
// Resolve the simpler args
@@ -115,7 +115,8 @@ impl AppServer {
let open_browser = args
.open
.unwrap_or_else(|| workspace.settings.always_open_browser.unwrap_or_default());
.unwrap_or_else(|| workspace.settings.always_open_browser.unwrap_or(true))
&& interactive;
let wsl_file_poll_interval = args
.wsl_file_poll_interval
@@ -161,15 +162,9 @@ impl AppServer {
let watch_fs = args.watch.unwrap_or(true);
let use_hotpatch_engine = args.hot_patch;
let build_mode = match use_hotpatch_engine {
true => BuildMode::Fat,
false => BuildMode::Base,
};
let client = AppBuilder::start(&client, build_mode.clone())?;
let server = server
.map(|server| AppBuilder::start(&server, build_mode))
.transpose()?;
let client = AppBuilder::new(&client)?;
let server = server.map(|server| AppBuilder::new(&server)).transpose()?;
let tw_watcher = TailwindCli::serve(
client.build.package_manifest_dir(),
@@ -229,6 +224,18 @@ impl AppServer {
Ok(runner)
}
pub(crate) fn initialize(&mut self) {
let build_mode = match self.use_hotpatch_engine {
true => BuildMode::Fat,
false => BuildMode::Base,
};
self.client.start(build_mode.clone());
if let Some(server) = self.server.as_mut() {
server.start(build_mode);
}
}
pub(crate) async fn rebuild_ssg(&mut self, devserver: &WebServer) {
if self.client.stage != BuildStage::Success {
return;
@@ -355,9 +362,10 @@ impl AppServer {
for path in files {
// for various assets that might be linked in, we just try to hotreloading them forcefully
// That is, unless they appear in an include! macro, in which case we need to a full rebuild....
let Some(ext) = path.extension().and_then(|v| v.to_str()) else {
continue;
};
let ext = path
.extension()
.and_then(|v| v.to_str())
.unwrap_or_default();
// If it's an asset, we want to hotreload it
// todo(jon): don't hardcode this here
@@ -458,6 +466,21 @@ impl AppServer {
}
}
}
// If it's not a rust file, then it might be depended on via include! or similar
if ext != "rs" {
if let Some(artifacts) = self.client.artifacts.as_ref() {
if artifacts.depinfo.files.contains(path) {
needs_full_rebuild = true;
break;
}
}
}
}
// If the client is in a failed state, any changes to rsx should trigger a rebuild/hotpatch
if self.client.stage == BuildStage::Failed && !templates.is_empty() {
needs_full_rebuild = true
}
// todo - we need to distinguish between hotpatchable rebuilds and true full rebuilds.
@@ -685,7 +708,7 @@ impl AppServer {
.hotpatch(res, cache)
.await
}
_ => return Err(Error::Runtime("Invalid build id".into())),
_ => bail!("Invalid build id"),
}?;
if id == BuildId::CLIENT {