diff --git a/Cargo.lock b/Cargo.lock index 685f2643..1517d0ae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2524,6 +2524,7 @@ dependencies = [ "de_types", "futures-lite 1.13.0", "iyes_progress", + "tracing", ] [[package]] @@ -2624,6 +2625,7 @@ dependencies = [ "de_types", "futures-lite 1.13.0", "thiserror", + "tracing", ] [[package]] @@ -2731,6 +2733,7 @@ dependencies = [ "rstar", "spade", "tinyvec", + "tracing", ] [[package]] diff --git a/crates/conf/src/io.rs b/crates/conf/src/io.rs index 9456747a..5f73a660 100644 --- a/crates/conf/src/io.rs +++ b/crates/conf/src/io.rs @@ -1,6 +1,6 @@ use anyhow::{Context, Result}; use async_std::{fs, path::Path}; -use bevy::prelude::info; +use tracing::info; /// Loads configuration file to a string. Returns Ok(None) if the configuration /// file does not exist. diff --git a/crates/core/src/errors.rs b/crates/core/src/errors.rs index b69c704f..e18a3c7c 100644 --- a/crates/core/src/errors.rs +++ b/crates/core/src/errors.rs @@ -4,7 +4,7 @@ macro_rules! log_full_error { use std::error::Error; use std::fmt::Write; - use bevy::prelude::error; + use tracing::error; let mut error_message = format!("{}", $err); let mut error: &dyn Error = &$err; diff --git a/crates/loader/Cargo.toml b/crates/loader/Cargo.toml index 603704a9..b747c24c 100644 --- a/crates/loader/Cargo.toml +++ b/crates/loader/Cargo.toml @@ -25,5 +25,6 @@ de_types.workspace = true # Other bevy.workspace = true -iyes_progress.workspace = true futures-lite.workspace = true +iyes_progress.workspace = true +tracing.workspace = true diff --git a/crates/menu/Cargo.toml b/crates/menu/Cargo.toml index b290ac4b..a6ddf687 100644 --- a/crates/menu/Cargo.toml +++ b/crates/menu/Cargo.toml @@ -28,3 +28,4 @@ async-std.workspace = true bevy.workspace = true futures-lite.workspace = true thiserror.workspace = true +tracing.workspace = true diff --git a/crates/objects/src/collection.rs b/crates/objects/src/collection.rs index c73186c6..4456736d 100644 --- a/crates/objects/src/collection.rs +++ b/crates/objects/src/collection.rs @@ -2,7 +2,7 @@ use std::{hash::Hash, path::PathBuf}; use ahash::AHashMap; use bevy::{ - asset::{Asset, AssetPath, LoadState, RecursiveDependencyLoadState}, + asset::{Asset, AssetPath, RecursiveDependencyLoadState}, prelude::*, }; use enum_iterator::Sequence; diff --git a/crates/objects/src/solids.rs b/crates/objects/src/solids.rs index 3aebb740..a8ea8471 100644 --- a/crates/objects/src/solids.rs +++ b/crates/objects/src/solids.rs @@ -1,10 +1,10 @@ use ahash::AHashMap; use anyhow::Context; use bevy::{ - asset::{io::Reader, AssetLoader, AsyncReadExt, LoadContext, LoadedAsset}, + asset::{io::Reader, AssetLoader, AsyncReadExt, LoadContext}, ecs::system::SystemParam, prelude::*, - reflect::{TypePath, TypeUuid}, + reflect::TypePath, utils::BoxedFuture, }; use de_core::state::AppState; @@ -135,7 +135,7 @@ impl AssetLoader for SolidObjectLoader { &'a self, reader: &'a mut Reader, _settings: &'a Self::Settings, - load_context: &'a mut LoadContext, + _load_context: &'a mut LoadContext, ) -> BoxedFuture<'a, anyhow::Result> { Box::pin(async move { let mut bytes = Vec::new(); diff --git a/crates/pathing/Cargo.toml b/crates/pathing/Cargo.toml index f8ce1b6c..3d8070f9 100644 --- a/crates/pathing/Cargo.toml +++ b/crates/pathing/Cargo.toml @@ -21,16 +21,17 @@ de_objects.workspace = true de_types.workspace = true # Other +ahash.workspace = true +approx.workspace = true bevy.workspace = true +futures-lite.workspace = true glam.workspace = true -parry2d.workspace = true nalgebra.workspace = true -ahash.workspace = true -approx.workspace = true +parry2d.workspace = true rstar.workspace = true -tinyvec.workspace = true spade.workspace = true -futures-lite.workspace = true +tinyvec.workspace = true +tracing.workspace = true [dev-dependencies] # DE diff --git a/crates/pathing/src/finder.rs b/crates/pathing/src/finder.rs index 627878a0..f4fd9097 100644 --- a/crates/pathing/src/finder.rs +++ b/crates/pathing/src/finder.rs @@ -1,7 +1,6 @@ //! This module contains global map shortest path finder. use ahash::AHashMap; -use bevy::prelude::{debug, info}; use de_map::size::MapBounds; use de_types::path::Path; use parry2d::{ @@ -12,6 +11,7 @@ use parry2d::{ }; use rstar::{PointDistance, RTree, RTreeObject, AABB}; use tinyvec::{ArrayVec, TinyVec}; +use tracing::{debug, info}; use crate::{ exclusion::ExclusionArea, diff --git a/crates/spawner/src/despawner.rs b/crates/spawner/src/despawner.rs index 3087e9bf..45e6bd91 100644 --- a/crates/spawner/src/despawner.rs +++ b/crates/spawner/src/despawner.rs @@ -311,7 +311,7 @@ mod tests { trace!("-----------------------------------"); assert_eq!( - simple_events.get(&app.world).iter().next().unwrap().data, + simple_events.get(&app.world).read().next().unwrap().data, TestComponent { value: 1 } ); @@ -335,7 +335,7 @@ mod tests { trace!("-----------------------------------"); assert_eq!( - complex_events.get(&app.world).iter().next().unwrap().data, + complex_events.get(&app.world).read().next().unwrap().data, ComplexComponent { value: 2, value2: ComplexStruct { diff --git a/crates/terrain/src/plugin.rs b/crates/terrain/src/plugin.rs index ec90a47c..81b3c866 100644 --- a/crates/terrain/src/plugin.rs +++ b/crates/terrain/src/plugin.rs @@ -1,11 +1,8 @@ use bevy::{ - asset::{AssetPath, LoadState}, + asset::LoadState, pbr::ExtendedMaterial, prelude::*, - render::{ - render_resource::{AddressMode, SamplerDescriptor}, - texture::{ImageAddressMode, ImageSampler, ImageSamplerDescriptor}, - }, + render::texture::{ImageAddressMode, ImageSampler, ImageSamplerDescriptor}, }; use de_core::{gamestate::GameState, state::AppState}; use iyes_progress::prelude::*;