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

+25 -69
View File
@@ -1,77 +1,33 @@
use std::fmt::Debug;
use thiserror::Error as ThisError;
pub(crate) type Result<T, E = Error> = std::result::Result<T, E>;
pub use anyhow::Error;
use itertools::Itertools;
#[derive(ThisError, Debug)]
pub(crate) enum Error {
/// Used when errors need to propagate but are too unique to be typed
#[error("{0}")]
Unique(String),
pub fn log_stacktrace(err: &anyhow::Error, padding: usize) -> String {
let mut trace = format!("{err}",);
#[error("I/O Error: {0}")]
IO(#[from] std::io::Error),
#[error("Format Error: {0}")]
Format(#[from] std::fmt::Error),
#[error("Format failed: {0}")]
Parse(String),
#[error("Runtime Error: {0}")]
Runtime(String),
#[error("Cargo Error: {0}")]
Cargo(String),
#[error("Invalid proxy URL: {0}")]
InvalidProxy(#[from] hyper::http::uri::InvalidUri),
#[error("Establishing proxy: {0}")]
ProxySetup(String),
#[error("Bundling project: {0}")]
BundleFailed(#[from] tauri_bundler::Error),
#[error("Performing hotpatch: {0}")]
PatchingFailed(#[from] crate::build::PatchError),
#[error("Reading object file: {0}")]
ObjectReadFailed(#[from] object::Error),
#[error("{0}")]
CapturedPanic(String),
#[error("Rendering template error: {0}")]
TemplateParse(#[from] handlebars::RenderError),
#[error("Network connectivity error: {0}")]
Network(String),
#[error(transparent)]
Other(#[from] anyhow::Error),
}
impl From<&str> for Error {
fn from(s: &str) -> Self {
Error::Unique(s.to_string())
for (idx, cause) in err.chain().enumerate().skip(1) {
trace.push_str(&format!(
"\n{}{IDX_STYLE}{idx}{IDX_STYLE:#}: {}",
" ".repeat(padding),
cause
.to_string()
.lines()
.enumerate()
.map(|(idx, line)| {
if idx == 0 {
line.to_string()
} else {
format!("{}{}", " ".repeat(padding + 3), line)
}
})
.join("\n"),
IDX_STYLE = crate::styles::GLOW_STYLE,
));
}
}
impl From<String> for Error {
fn from(s: String) -> Self {
Error::Unique(s)
if crate::VERBOSITY.get().unwrap().trace {
trace.push_str(&format!("\nBacktrace:\n{}", err.backtrace()));
}
}
impl From<html_parser::Error> for Error {
fn from(e: html_parser::Error) -> Self {
Self::Parse(e.to_string())
}
}
impl From<hyper::Error> for Error {
fn from(e: hyper::Error) -> Self {
Self::Runtime(e.to_string())
}
trace
}