From b77f565dccc8a801ec208974d6abc0db16560a0d Mon Sep 17 00:00:00 2001 From: Katherine Kiefer Date: Mon, 10 Jun 2024 21:13:00 +1000 Subject: [PATCH] ditch simpleeyre fuck off --- Cargo.lock | 11 ----------- Cargo.toml | 1 - src/lib.rs | 17 +++++++---------- src/turfs/groups.rs | 1 - src/turfs/katmos.rs | 2 +- src/turfs/processing.rs | 5 ----- 6 files changed, 8 insertions(+), 29 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0db0e65..5071273 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -77,7 +77,6 @@ dependencies = [ "parking_lot", "petgraph", "rayon", - "simple-eyre", "tinyvec", "tracing", "tracing-subscriber", @@ -881,16 +880,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[package]] -name = "simple-eyre" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b561532e8ffe7ecf09108c4f662896a9ec3eac4999eba84015ec3dcb8cc630a" -dependencies = [ - "eyre", - "indenter", -] - [[package]] name = "siphasher" version = "0.3.11" diff --git a/Cargo.toml b/Cargo.toml index d4c8b8a..b95e289 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,7 +55,6 @@ petgraph = "0.6.5" bitflags = "2.5.0" nom = "7.1.3" mimalloc = { version = "0.1.42", default-features = false } -simple-eyre = "0.3.1" tracing = { version = "0.1.40", optional = true } tracing-tracy = { version = "0.11.0", optional = true } diff --git a/src/lib.rs b/src/lib.rs index 3f6aa80..55a8436 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,18 +22,15 @@ use gas::constants::{ReactionReturn, GAS_MIN_MOLES, MINIMUM_MOLES_DELTA_TO_MOVE} #[global_allocator] static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; +#[cfg(feature = "tracy")] #[byondapi::init] pub fn init_eyre() { - simple_eyre::install().unwrap(); - #[cfg(feature = "tracy")] - { - use tracing_subscriber::layer::SubscriberExt; - - tracing::subscriber::set_global_default( - tracing_subscriber::registry().with(tracing_tracy::TracyLayer::default()), - ) - .expect("setup tracy layer"); - } + use tracing_subscriber::layer::SubscriberExt; + + tracing::subscriber::set_global_default( + tracing_subscriber::registry().with(tracing_tracy::TracyLayer::default()), + ) + .expect("setup tracy layer"); } /// Args: (ms). Runs callbacks until time limit is reached. If time limit is omitted, runs all callbacks. diff --git a/src/turfs/groups.rs b/src/turfs/groups.rs index 443b986..133c950 100644 --- a/src/turfs/groups.rs +++ b/src/turfs/groups.rs @@ -21,7 +21,6 @@ pub fn send_to_groups(sent: BTreeSet) { } #[byondapi::bind("/datum/controller/subsystem/air/proc/process_excited_groups_auxtools")] -#[cfg_attr(feature = "tracy", tracing::instrument(skip_all))] fn groups_hook(mut src: ByondValue, remaining: ByondValue) { let group_pressure_goal = src .read_number_id(byond_string!("excited_group_pressure_goal")) diff --git a/src/turfs/katmos.rs b/src/turfs/katmos.rs index e1ba256..139b093 100644 --- a/src/turfs/katmos.rs +++ b/src/turfs/katmos.rs @@ -510,6 +510,7 @@ fn explosively_depressurize(initial_index: TurfID, equalize_hard_turf_limit: usi Ok(()) } + #[cfg_attr(feature = "tracy", tracing::instrument(skip_all))] fn flood_fill_zones( (index_node, index_turf): (NodeIndex, TurfID), @@ -722,7 +723,6 @@ fn send_pressure_differences( } #[byondapi::bind("/datum/controller/subsystem/air/proc/process_turf_equalize_auxtools")] -#[cfg_attr(feature = "tracy", tracing::instrument(skip_all))] fn equalize_hook(mut src: ByondValue, remaining: ByondValue) { let equalize_hard_turf_limit = src .read_number_id(byond_string!("equalize_hard_turf_limit")) diff --git a/src/turfs/processing.rs b/src/turfs/processing.rs index 0ab32cc..3665bcf 100644 --- a/src/turfs/processing.rs +++ b/src/turfs/processing.rs @@ -21,13 +21,11 @@ fn thread_running_hook() { } #[byondapi::bind("/datum/controller/subsystem/air/proc/finish_turf_processing_auxtools")] -#[cfg_attr(feature = "tracy", tracing::instrument(skip_all))] fn finish_process_turfs(time_remaining: ByondValue) { Ok(process_callbacks_for_millis(time_remaining.get_number()? as u64).into()) } #[byondapi::bind("/datum/controller/subsystem/air/proc/process_turfs_auxtools")] -#[cfg_attr(feature = "tracy", tracing::instrument(skip_all))] fn process_turf_hook(src: ByondValue, remaining: ByondValue) { let remaining_time = Duration::from_millis(remaining.get_number().unwrap_or(50.0) as u64); let fdm_max_steps = src @@ -99,7 +97,6 @@ fn process_turf( Ok(()) } -#[cfg_attr(feature = "tracy", tracing::instrument(skip_all))] fn planet_process(planet_share_ratio: f32) { with_turf_gases_read(|arena| { GasArena::with_all_mixtures(|all_mixtures| { @@ -228,7 +225,6 @@ fn process_cell( } // Solving the heat equation using a Finite Difference Method, an iterative stencil loop. -#[cfg_attr(feature = "tracy", tracing::instrument(skip_all))] fn fdm( (start_time, remaining_time): (&Instant, Duration), fdm_max_steps: i32, @@ -387,7 +383,6 @@ fn post_process_cell<'a>( // Goes through every turf, checks if it should reset to planet atmos, if it should // update visuals, if it should react, sends a callback if it should. -#[cfg_attr(feature = "tracy", tracing::instrument(skip_all))] fn post_process() { let vis = crate::gas::visibility_copies(); with_turf_gases_read(|arena| {