diff --git a/Cargo.lock b/Cargo.lock index 588fab467c0..febf36a1d10 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1455,6 +1455,7 @@ dependencies = [ "notify-rust", "objc", "once_cell", + "parking_lot 0.12.1", "plot_icon", "rand 0.8.5", "regex", @@ -1466,6 +1467,7 @@ dependencies = [ "titlecase", "tokio", "tokio-util", + "tracing", "unic-langid", "uuid", "walkdir", @@ -2594,6 +2596,7 @@ dependencies = [ "kit", "once_cell", "regex", + "tracing", "uuid", "warp", ] @@ -4703,7 +4706,6 @@ dependencies = [ "glob", "humansize", "linkify", - "log", "mime", "once_cell", "pulldown-cmark", @@ -4714,6 +4716,7 @@ dependencies = [ "serde", "serde_json", "timeago", + "tracing", "unic-emoji-char", "unic-segment", "uuid", @@ -8494,7 +8497,7 @@ checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" [[package]] name = "shuttle" version = "0.1.0" -source = "git+https://github.com/Satellite-im/Warp?rev=a92a3674cd1d2e700e5275beb606984160cb9532#a92a3674cd1d2e700e5275beb606984160cb9532" +source = "git+https://github.com/Satellite-im/Warp?rev=32f4c53fc462d53553a31762ecd12b4af9329a4a#32f4c53fc462d53553a31762ecd12b4af9329a4a" dependencies = [ "anyhow", "async-stream", @@ -9758,6 +9761,7 @@ dependencies = [ "once_cell", "open", "opener", + "parking_lot 0.12.1", "rand 0.8.5", "raw-window-handle", "regex", @@ -9772,6 +9776,7 @@ dependencies = [ "titlecase", "tokio", "tokio-util", + "tracing", "uuid", "walkdir", "warp", @@ -9893,7 +9898,7 @@ dependencies = [ [[package]] name = "warp" version = "0.1.0" -source = "git+https://github.com/Satellite-im/Warp?rev=a92a3674cd1d2e700e5275beb606984160cb9532#a92a3674cd1d2e700e5275beb606984160cb9532" +source = "git+https://github.com/Satellite-im/Warp?rev=32f4c53fc462d53553a31762ecd12b4af9329a4a#32f4c53fc462d53553a31762ecd12b4af9329a4a" dependencies = [ "aes-gcm 0.10.3", "anyhow", @@ -9948,7 +9953,7 @@ dependencies = [ [[package]] name = "warp-blink-wrtc" version = "0.1.0" -source = "git+https://github.com/Satellite-im/Warp?rev=a92a3674cd1d2e700e5275beb606984160cb9532#a92a3674cd1d2e700e5275beb606984160cb9532" +source = "git+https://github.com/Satellite-im/Warp?rev=32f4c53fc462d53553a31762ecd12b4af9329a4a#32f4c53fc462d53553a31762ecd12b4af9329a4a" dependencies = [ "anyhow", "async-stream", @@ -9965,6 +9970,7 @@ dependencies = [ "mp4", "once_cell", "opus", + "parking_lot 0.12.1", "rand 0.8.5", "rayon", "ringbuf", @@ -9980,7 +9986,7 @@ dependencies = [ [[package]] name = "warp-ipfs" version = "0.1.0" -source = "git+https://github.com/Satellite-im/Warp?rev=a92a3674cd1d2e700e5275beb606984160cb9532#a92a3674cd1d2e700e5275beb606984160cb9532" +source = "git+https://github.com/Satellite-im/Warp?rev=32f4c53fc462d53553a31762ecd12b4af9329a4a#32f4c53fc462d53553a31762ecd12b4af9329a4a" dependencies = [ "anyhow", "async-recursion 1.0.5", @@ -9998,6 +10004,7 @@ dependencies = [ "image", "libipld", "mediatype", + "parking_lot 0.12.1", "rust-ipfs", "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index 65bdec5933f..94deb5828bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,9 +45,9 @@ arboard = "3.2" humansize = "2.1.3" uuid = { version = "1", features = ["serde", "v4"] } libloading = "0.7.4" -warp = { git = "https://github.com/Satellite-im/Warp", rev = "a92a3674cd1d2e700e5275beb606984160cb9532" } -warp-ipfs = { git = "https://github.com/Satellite-im/Warp", rev = "a92a3674cd1d2e700e5275beb606984160cb9532" } -warp-blink-wrtc = { git = "https://github.com/Satellite-im/Warp", rev = "a92a3674cd1d2e700e5275beb606984160cb9532" } +warp = { git = "https://github.com/Satellite-im/Warp", rev = "32f4c53fc462d53553a31762ecd12b4af9329a4a" } +warp-ipfs = { git = "https://github.com/Satellite-im/Warp", rev = "32f4c53fc462d53553a31762ecd12b4af9329a4a" } +warp-blink-wrtc = { git = "https://github.com/Satellite-im/Warp", rev = "32f4c53fc462d53553a31762ecd12b4af9329a4a" } rfd = "0.11.3" mime = "0.3.16" serde = "1.0" @@ -72,6 +72,9 @@ tempfile = "3.0.7" fdlimit = "0.2" once_cell = "1.17" +parking_lot = { version = "0.12" } +tracing = { version = "0.1" } +tracing-futures = { version = "0.2" } futures = "0.3" tokio = { version = "1", features = ["full"] } diff --git a/common/Cargo.toml b/common/Cargo.toml index 78c076c99fa..545c3135bf4 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -28,6 +28,8 @@ names = "0.14.0" titlecase = { workspace = true } substring = "1.4.5" plot_icon = "0.3.0" +tracing.workspace = true +parking_lot.workspace = true icons = { workspace = true } humansize = { workspace = true } zip = "0.6.4" diff --git a/common/src/language/mod.rs b/common/src/language/mod.rs index 7b7f9165922..4902cb39fb4 100644 --- a/common/src/language/mod.rs +++ b/common/src/language/mod.rs @@ -3,8 +3,8 @@ use std::collections::HashMap; use fluent_templates::{ fluent_bundle::FluentValue, once_cell::sync::Lazy, LanguageIdentifier, Loader, }; +use parking_lot::RwLock; use unic_langid::langid; -use warp::sync::RwLock; use crate::LOCALES; diff --git a/common/src/notifications.rs b/common/src/notifications.rs index 6875fe81677..55c9351866d 100644 --- a/common/src/notifications.rs +++ b/common/src/notifications.rs @@ -6,8 +6,8 @@ use super::sounds::{Play, Sounds}; use derive_more::Display; use notify_rust::Notification; use std::sync::Arc; +use tracing::log; use uuid::Uuid; -use warp::logging::tracing::log; use once_cell::sync::Lazy; use tokio::sync::{ diff --git a/common/src/sounds.rs b/common/src/sounds.rs index ece4d42a2f6..de8071ab62c 100644 --- a/common/src/sounds.rs +++ b/common/src/sounds.rs @@ -2,7 +2,7 @@ use std::sync::{ atomic::{AtomicBool, Ordering}, Arc, }; -use warp::logging::tracing::log; +use tracing::log; pub enum Sounds { Notification, diff --git a/common/src/state/configuration.rs b/common/src/state/configuration.rs index b9a3aebe974..e3fb594e227 100644 --- a/common/src/state/configuration.rs +++ b/common/src/state/configuration.rs @@ -1,5 +1,5 @@ use serde::{Deserialize, Serialize}; -use warp::logging::tracing::log; +use tracing::log; use crate::STATIC_ARGS; diff --git a/common/src/state/mod.rs b/common/src/state/mod.rs index 0eb89152c85..0a99503d839 100644 --- a/common/src/state/mod.rs +++ b/common/src/state/mod.rs @@ -50,12 +50,9 @@ use std::{ time::{Duration, Instant}, }; use uuid::Uuid; -use warp::{ - crypto::DID, - logging::tracing::log, - multipass::identity::IdentityStatus, - raygun::{self}, -}; +use warp::{crypto::DID, multipass::identity::IdentityStatus, raygun}; + +use tracing::log; use self::call::Call; use self::pending_message::PendingMessage; diff --git a/common/src/state/ui.rs b/common/src/state/ui.rs index e6b3b303e3c..94e0223c44c 100644 --- a/common/src/state/ui.rs +++ b/common/src/state/ui.rs @@ -11,8 +11,8 @@ use std::{ collections::{hash_map, HashMap}, rc::Weak, }; +use tracing::log; use uuid::Uuid; -use warp::logging::tracing::log; use super::{call, notifications::Notifications}; diff --git a/common/src/state/utils.rs b/common/src/state/utils.rs index 6568a932aab..03540ac01d1 100644 --- a/common/src/state/utils.rs +++ b/common/src/state/utils.rs @@ -6,9 +6,10 @@ use std::{ use once_cell::sync::Lazy; use regex::{Captures, Regex, Replacer}; use titlecase::titlecase; +use tracing::log; use uuid::Uuid; use walkdir::WalkDir; -use warp::{crypto::DID, logging::tracing::log}; +use warp::crypto::DID; use crate::{get_extras_dir, STATIC_ARGS}; diff --git a/common/src/utils/clear_temp_files_dir.rs b/common/src/utils/clear_temp_files_dir.rs index 6198f3f54b4..11e779e208c 100644 --- a/common/src/utils/clear_temp_files_dir.rs +++ b/common/src/utils/clear_temp_files_dir.rs @@ -1,5 +1,5 @@ use std::{fs, io}; -use warp::logging::tracing::log; +use tracing::log; use crate::STATIC_ARGS; diff --git a/common/src/warp_runner/manager/commands/blink_commands.rs b/common/src/warp_runner/manager/commands/blink_commands.rs index f22aab601b1..ff68d07b7bc 100644 --- a/common/src/warp_runner/manager/commands/blink_commands.rs +++ b/common/src/warp_runner/manager/commands/blink_commands.rs @@ -1,8 +1,8 @@ use derive_more::Display; use futures::channel::oneshot::{self}; use tokio::sync::mpsc::UnboundedReceiver; +use tracing::log; use uuid::Uuid; -use warp::logging::tracing::log; use warp::{ blink::{AudioDeviceConfig, AudioTestEvent}, crypto::DID, diff --git a/common/src/warp_runner/manager/commands/constellation_commands.rs b/common/src/warp_runner/manager/commands/constellation_commands.rs index aa28e1cbc4e..53993630f3e 100644 --- a/common/src/warp_runner/manager/commands/constellation_commands.rs +++ b/common/src/warp_runner/manager/commands/constellation_commands.rs @@ -29,10 +29,11 @@ use warp::{ ConstellationProgressStream, Progression, }, error::Error, - logging::tracing::log, - sync::RwLock, }; +use parking_lot::RwLock; +use tracing::log; + static DIRECTORIES_AVAILABLE_TO_BROWSE: Lazy>> = Lazy::new(|| RwLock::new(Vec::new())); diff --git a/common/src/warp_runner/manager/commands/multipass_commands.rs b/common/src/warp_runner/manager/commands/multipass_commands.rs index b250ec24c7c..53ea07ea488 100644 --- a/common/src/warp_runner/manager/commands/multipass_commands.rs +++ b/common/src/warp_runner/manager/commands/multipass_commands.rs @@ -7,13 +7,14 @@ use warp::{ constellation::file::FileType, crypto::DID, error::Error, - logging::tracing::log, multipass::{ self, identity::{self, Identifier, IdentityImage, IdentityStatus, IdentityUpdate}, }, }; +use tracing::log; + use crate::{ state::{self, Identity}, warp_runner::{ui_adapter::dids_to_identity, Account}, diff --git a/common/src/warp_runner/manager/commands/other_commands.rs b/common/src/warp_runner/manager/commands/other_commands.rs index d8b0a5a2b98..4ec373ee667 100644 --- a/common/src/warp_runner/manager/commands/other_commands.rs +++ b/common/src/warp_runner/manager/commands/other_commands.rs @@ -8,7 +8,10 @@ use zip::{result::ZipError, write::FileOptions}; use derive_more::Display; use futures::channel::oneshot; -use warp::{error, logging::tracing::log}; +use warp::error; + +use tracing::log; + #[derive(Display)] pub enum OtherCmd { #[display(fmt = "CompressFolder {{ src: {src:?}, dest: {dest:?} }} ")] diff --git a/common/src/warp_runner/manager/commands/raygun_commands.rs b/common/src/warp_runner/manager/commands/raygun_commands.rs index 7cd18f8dc04..85234d97992 100644 --- a/common/src/warp_runner/manager/commands/raygun_commands.rs +++ b/common/src/warp_runner/manager/commands/raygun_commands.rs @@ -11,13 +11,14 @@ use warp::{ constellation::ConstellationProgressStream, crypto::DID, error::Error, - logging::tracing::log, raygun::{ self, AttachmentEventStream, ConversationType, GroupSettings, Location, PinState, ReactionState, }, }; +use tracing::log; + use crate::{ state::{chats, identity, Friends}, warp_runner::{ diff --git a/common/src/warp_runner/manager/events.rs b/common/src/warp_runner/manager/events.rs index 778d7e377a0..c9f3e77070d 100644 --- a/common/src/warp_runner/manager/events.rs +++ b/common/src/warp_runner/manager/events.rs @@ -1,10 +1,11 @@ use warp::{ blink::BlinkEventKind, - logging::tracing::log, multipass::MultiPassEventKind, raygun::{MessageEventKind, RayGunEventKind}, }; +use tracing::log; + use crate::{ warp_runner::{ conv_stream, diff --git a/common/src/warp_runner/manager/mod.rs b/common/src/warp_runner/manager/mod.rs index 310773afc13..e912564e296 100644 --- a/common/src/warp_runner/manager/mod.rs +++ b/common/src/warp_runner/manager/mod.rs @@ -7,10 +7,12 @@ use std::sync::Arc; use tokio::sync::Notify; use warp::{ - blink::BlinkEventStream, logging::tracing::log, multipass::MultiPassEventStream, - raygun::RayGunEventStream, tesseract::Tesseract, + blink::BlinkEventStream, multipass::MultiPassEventStream, raygun::RayGunEventStream, + tesseract::Tesseract, }; +use tracing::log; + use super::{conv_stream, Account, Calling, Messaging, Storage}; use crate::WARP_CMD_CH; diff --git a/common/src/warp_runner/mod.rs b/common/src/warp_runner/mod.rs index d2698b46fe5..3eb9fd82f6c 100644 --- a/common/src/warp_runner/mod.rs +++ b/common/src/warp_runner/mod.rs @@ -1,15 +1,13 @@ //! Defines important types and structs, and spawns the main task for warp_runner - manager::run. use derive_more::Display; -use std::{ - collections::{HashMap, HashSet}, - sync::Arc, -}; +use std::sync::Arc; use tokio::sync::{ broadcast, mpsc::{UnboundedReceiver, UnboundedSender}, Mutex, Notify, }; +use tracing::log; use warp::{ blink::{ Blink::{self}, @@ -17,7 +15,6 @@ use warp::{ }, constellation::{file::FileType, Constellation}, error::Error, - logging::tracing::log, multipass::{self, IdentityImportOption, MultiPass}, raygun::RayGun, tesseract::Tesseract, @@ -353,16 +350,13 @@ impl From<&DiscoveryMode> for Discovery { addresses: vec![address.parse().expect("Valid multiaddr address")], }, }, - DiscoveryMode::Shuttle => Discovery::Shuttle { - addresses: HashMap::from_iter([( - "12D3KooWJSes8386p2T1sMeZ2DzsNJThKkZWbj4US6uPMpEgBTHu" - .parse() - .expect("Valid id"), - HashSet::from_iter(["/ip4/104.236.194.35/tcp/34053" - .parse() - .expect("valid addr")]), - )]), - }, + DiscoveryMode::Shuttle => { + let addresses = Vec::from_iter(["/ip4/104.236.194.35/tcp/34053/p2p/12D3KooWJSes8386p2T1sMeZ2DzsNJThKkZWbj4US6uPMpEgBTHu" + .parse() + .expect("valid addr")]); + + Discovery::Shuttle { addresses } + } DiscoveryMode::Disable => Discovery::None, } } diff --git a/common/src/warp_runner/ui_adapter/mod.rs b/common/src/warp_runner/ui_adapter/mod.rs index 3c80fb5e244..c8fc1f6a5b4 100644 --- a/common/src/warp_runner/ui_adapter/mod.rs +++ b/common/src/warp_runner/ui_adapter/mod.rs @@ -23,11 +23,12 @@ use warp::{ constellation::file::File, crypto::DID, error::Error, - logging::tracing::log, multipass::identity::{Identifier, Platform}, raygun::{self, Conversation, MessageOptions}, }; +use tracing::log; + use super::{ manager::commands::identity_image_to_base64, FetchMessagesConfig, FetchMessagesResponse, }; diff --git a/common/src/warp_runner/ui_adapter/raygun_event.rs b/common/src/warp_runner/ui_adapter/raygun_event.rs index f9705f27506..f86338cc971 100644 --- a/common/src/warp_runner/ui_adapter/raygun_event.rs +++ b/common/src/warp_runner/ui_adapter/raygun_event.rs @@ -1,8 +1,8 @@ +use super::{super::conv_stream, init_conversation, ChatAdapter}; use derive_more::Display; +use tracing::log; use uuid::Uuid; -use warp::{error::Error, logging::tracing::log, raygun::RayGunEventKind}; - -use super::{super::conv_stream, init_conversation, ChatAdapter}; +use warp::{error::Error, raygun::RayGunEventKind}; #[allow(clippy::large_enum_variant)] #[derive(Display, Clone)] diff --git a/kit/Cargo.toml b/kit/Cargo.toml index f1d3825e5af..70eb24cf516 100644 --- a/kit/Cargo.toml +++ b/kit/Cargo.toml @@ -33,7 +33,7 @@ once_cell = { workspace = true } emojis = "0.5" unic-segment = "0.9" unic-emoji-char = "0.9" -log = { workspace = true } +tracing = { workspace = true } [dependencies.uuid] workspace = true diff --git a/kit/src/components/message/mod.rs b/kit/src/components/message/mod.rs index 0a92a08f82e..2e1a04e006e 100644 --- a/kit/src/components/message/mod.rs +++ b/kit/src/components/message/mod.rs @@ -20,9 +20,10 @@ use warp::error::Error; use warp::{ constellation::{file::File, Progression}, crypto::DID, - logging::tracing::log, }; +use tracing::log; + use common::icons::outline::Shape as Icon; use crate::components::context_menu::{ContextItem, ContextMenu, IdentityHeader}; diff --git a/kit/src/components/slide_selector/mod.rs b/kit/src/components/slide_selector/mod.rs index 77c6fb71680..444095145ab 100644 --- a/kit/src/components/slide_selector/mod.rs +++ b/kit/src/components/slide_selector/mod.rs @@ -1,6 +1,6 @@ use common::icons::outline::Shape; use dioxus::prelude::*; -use warp::logging::tracing::log; +use tracing::log; use crate::elements::button::Button; diff --git a/kit/src/elements/textarea/mod.rs b/kit/src/elements/textarea/mod.rs index dc4d9d2251d..f82a01dbdd0 100644 --- a/kit/src/elements/textarea/mod.rs +++ b/kit/src/elements/textarea/mod.rs @@ -8,8 +8,8 @@ use dioxus_html::input_data::keyboard_types::Modifiers; use once_cell::sync::Lazy; use regex::Regex; use serde::Deserialize; +use tracing::log; use uuid::Uuid; -use warp::logging::tracing::log; // "{\"Input\":\"((?:.|\n)*)\"}" static INPUT_REGEX: Lazy = diff --git a/kit/src/layout/topbar/mod.rs b/kit/src/layout/topbar/mod.rs index 9cd2282704a..15068c43f23 100644 --- a/kit/src/layout/topbar/mod.rs +++ b/kit/src/layout/topbar/mod.rs @@ -1,6 +1,6 @@ use common::icons; use dioxus::prelude::*; -use warp::logging::tracing::log; +use tracing::log; use crate::elements::{button::Button, Appearance}; diff --git a/native_extensions/emoji_selector/Cargo.toml b/native_extensions/emoji_selector/Cargo.toml index 7d02c3dce8a..9e479250e62 100644 --- a/native_extensions/emoji_selector/Cargo.toml +++ b/native_extensions/emoji_selector/Cargo.toml @@ -19,3 +19,4 @@ warp = { workspace = true} uuid = { workspace = true } futures = { workspace = true } regex = { workspace = true } +tracing.workspace = true \ No newline at end of file diff --git a/native_extensions/emoji_selector/src/lib.rs b/native_extensions/emoji_selector/src/lib.rs index e3f1284c843..417e91de2c7 100644 --- a/native_extensions/emoji_selector/src/lib.rs +++ b/native_extensions/emoji_selector/src/lib.rs @@ -15,9 +15,9 @@ use kit::{ }; use once_cell::sync::Lazy; use regex::Regex; +use tracing::log; use uuid::Uuid; -use warp::{logging::tracing::log, raygun::ReactionState}; - +use warp::raygun::ReactionState; // These two lines are all you need to use your Extension implementation as a shared library static EXTENSION: Lazy = Lazy::new(|| EmojiSelector {}); static EMOJI_REGEX: Lazy = Lazy::new(|| Regex::new(":[^:]{2,}:?$").unwrap()); diff --git a/ui/Cargo.toml b/ui/Cargo.toml index e10c15ee6ea..f1d6e3ad352 100644 --- a/ui/Cargo.toml +++ b/ui/Cargo.toml @@ -49,6 +49,8 @@ tempfile = { workspace = true } fdlimit = { workspace = true } once_cell = { workspace = true } +tracing.workspace = true +parking_lot.workspace = true futures = { workspace = true } tokio = { workspace = true, features = ["full"] } @@ -65,8 +67,8 @@ reqwest = { workspace = true, default-features = false, features = [ "stream", ] } log = { workspace = true } -env_logger = { version = "0.10"} -dotenv = {version = "0.15.0"} +env_logger = { version = "0.10" } +dotenv = { version = "0.15.0" } [features] default = ["dioxus-desktop/devtools"] diff --git a/ui/src/components/friends/add.rs b/ui/src/components/friends/add.rs index d2399dfb18e..cf7fc5b3759 100644 --- a/ui/src/components/friends/add.rs +++ b/ui/src/components/friends/add.rs @@ -14,8 +14,10 @@ use kit::elements::{ tooltip::Tooltip, }; +use warp::crypto::DID; use warp::error::Error; -use warp::{crypto::DID, logging::tracing::log}; + +use tracing::log; use common::icons::outline::Shape as Icon; use common::{ diff --git a/ui/src/components/friends/blocked/mod.rs b/ui/src/components/friends/blocked/mod.rs index b64df4f720a..c1578dd2f99 100644 --- a/ui/src/components/friends/blocked/mod.rs +++ b/ui/src/components/friends/blocked/mod.rs @@ -17,7 +17,9 @@ use kit::{ }, elements::label::Label, }; -use warp::{crypto::DID, error::Error, logging::tracing::log, multipass::identity::Relationship}; +use warp::{crypto::DID, error::Error, multipass::identity::Relationship}; + +use tracing::log; #[allow(non_snake_case)] pub fn BlockedUsers(cx: Scope) -> Element { diff --git a/ui/src/components/friends/friends_list/mod.rs b/ui/src/components/friends/friends_list/mod.rs index 5a109af4375..a6b50905542 100644 --- a/ui/src/components/friends/friends_list/mod.rs +++ b/ui/src/components/friends/friends_list/mod.rs @@ -31,11 +31,12 @@ use common::{ use uuid::Uuid; use warp::{ crypto::DID, - logging::tracing::log, multipass::identity::Relationship, raygun::{self, ConversationType}, }; +use tracing::log; + use crate::{ components::friends::friend::{Friend, SkeletalFriend}, utils::build_participants, diff --git a/ui/src/components/friends/incoming_requests/mod.rs b/ui/src/components/friends/incoming_requests/mod.rs index 3b92a7cc6f4..48eeb639825 100644 --- a/ui/src/components/friends/incoming_requests/mod.rs +++ b/ui/src/components/friends/incoming_requests/mod.rs @@ -19,7 +19,9 @@ use kit::{ elements::label::Label, }; use warp::crypto::DID; -use warp::{logging::tracing::log, multipass::identity::Relationship}; +use warp::multipass::identity::Relationship; + +use tracing::log; enum ChanCmd { AcceptRequest(DID), diff --git a/ui/src/components/friends/outgoing_requests/mod.rs b/ui/src/components/friends/outgoing_requests/mod.rs index 3bbc56d4809..94348766378 100644 --- a/ui/src/components/friends/outgoing_requests/mod.rs +++ b/ui/src/components/friends/outgoing_requests/mod.rs @@ -17,7 +17,9 @@ use kit::{ }, elements::label::Label, }; -use warp::{crypto::DID, logging::tracing::log, multipass::identity::Relationship}; +use warp::{crypto::DID, multipass::identity::Relationship}; + +use tracing::log; #[allow(non_snake_case)] pub fn OutgoingRequests(cx: Scope) -> Element { diff --git a/ui/src/components/settings/sub_pages/about.rs b/ui/src/components/settings/sub_pages/about.rs index abeef9daaf8..54f2ffc1c82 100644 --- a/ui/src/components/settings/sub_pages/about.rs +++ b/ui/src/components/settings/sub_pages/about.rs @@ -8,7 +8,7 @@ use dioxus_desktop::use_window; use futures::StreamExt; use kit::elements::{button::Button, Appearance}; -use warp::logging::tracing::log; +use tracing::log; use crate::get_download_modal; use crate::utils::auto_updater::{DownloadProgress, DownloadState, SoftwareDownloadCmd}; diff --git a/ui/src/components/settings/sub_pages/accessibility.rs b/ui/src/components/settings/sub_pages/accessibility.rs index 82d2dec8bb7..601629510e0 100644 --- a/ui/src/components/settings/sub_pages/accessibility.rs +++ b/ui/src/components/settings/sub_pages/accessibility.rs @@ -2,7 +2,7 @@ use common::language::get_local_text; use common::state::{action::ConfigAction, Action, State}; use dioxus::prelude::*; use kit::elements::switch::Switch; -use warp::logging::tracing::log; +use tracing::log; use crate::components::settings::SettingSection; diff --git a/ui/src/components/settings/sub_pages/audio.rs b/ui/src/components/settings/sub_pages/audio.rs index a894f087dda..549961b00c2 100644 --- a/ui/src/components/settings/sub_pages/audio.rs +++ b/ui/src/components/settings/sub_pages/audio.rs @@ -9,8 +9,8 @@ use futures::{channel::oneshot, StreamExt}; use kit::elements::button::Button; use kit::elements::select::Select; use kit::elements::switch::Switch; +use tracing::log; use warp::blink::AudioTestEvent; -use warp::logging::tracing::log; use crate::components::settings::{SettingSection, SettingSectionSimple}; use common::state::{action::ConfigAction, Action, State}; diff --git a/ui/src/components/settings/sub_pages/developer.rs b/ui/src/components/settings/sub_pages/developer.rs index 6a3afb77474..b6b5f371525 100644 --- a/ui/src/components/settings/sub_pages/developer.rs +++ b/ui/src/components/settings/sub_pages/developer.rs @@ -16,7 +16,7 @@ use futures::channel::oneshot; use futures::StreamExt; use kit::elements::{button::Button, switch::Switch, Appearance}; use rfd::FileDialog; -use warp::logging::tracing::log; +use tracing::log; use crate::{components::settings::SettingSection, logger}; diff --git a/ui/src/components/settings/sub_pages/files.rs b/ui/src/components/settings/sub_pages/files.rs index 212713e32e5..8a2d92c986f 100644 --- a/ui/src/components/settings/sub_pages/files.rs +++ b/ui/src/components/settings/sub_pages/files.rs @@ -2,7 +2,7 @@ use common::language::get_local_text; use dioxus::prelude::*; #[allow(unused_imports)] use kit::elements::{button::Button, switch::Switch}; -use warp::logging::tracing::log; +use tracing::log; use crate::components::settings::SettingSection; diff --git a/ui/src/components/settings/sub_pages/general.rs b/ui/src/components/settings/sub_pages/general.rs index fb66c3017d0..a4c7a1b00bb 100644 --- a/ui/src/components/settings/sub_pages/general.rs +++ b/ui/src/components/settings/sub_pages/general.rs @@ -10,7 +10,7 @@ use kit::elements::button::Button; use kit::elements::tooltip::{ArrowPosition, Tooltip}; #[allow(unused_imports)] use kit::elements::{select::Select, switch::Switch}; -use warp::logging::tracing::log; +use tracing::log; use crate::components::settings::{SettingSection, SettingSectionSimple}; use crate::utils::get_font_sizes::FONT_SIZE_OPTIONS; diff --git a/ui/src/components/settings/sub_pages/licenses.rs b/ui/src/components/settings/sub_pages/licenses.rs index 095a9d3ed86..d12848bbddb 100644 --- a/ui/src/components/settings/sub_pages/licenses.rs +++ b/ui/src/components/settings/sub_pages/licenses.rs @@ -2,7 +2,7 @@ use common::icons::outline::Shape as Icon; use dioxus::prelude::*; use kit::elements::button::Button; use kit::elements::Appearance; -use warp::logging::tracing::log; +use tracing::log; use crate::components::settings::SettingSection; diff --git a/ui/src/components/settings/sub_pages/messages.rs b/ui/src/components/settings/sub_pages/messages.rs index ac4bae39dbb..9b5972fb39c 100644 --- a/ui/src/components/settings/sub_pages/messages.rs +++ b/ui/src/components/settings/sub_pages/messages.rs @@ -4,7 +4,7 @@ use common::{ }; use dioxus::prelude::*; use kit::elements::switch::Switch; -use warp::logging::tracing::log; +use tracing::log; use crate::components::settings::SettingSection; diff --git a/ui/src/components/settings/sub_pages/privacy.rs b/ui/src/components/settings/sub_pages/privacy.rs index 62afa0875c7..99be846f97f 100644 --- a/ui/src/components/settings/sub_pages/privacy.rs +++ b/ui/src/components/settings/sub_pages/privacy.rs @@ -3,7 +3,7 @@ use common::icons::outline::Shape as Icon; use common::language::get_local_text; use dioxus::prelude::*; use kit::elements::{button::Button, Appearance}; -use warp::logging::tracing::log; +use tracing::log; use crate::components::settings::SettingSection; diff --git a/ui/src/components/settings/sub_pages/profile/mod.rs b/ui/src/components/settings/sub_pages/profile/mod.rs index 6c53c731b4e..18946ea2662 100644 --- a/ui/src/components/settings/sub_pages/profile/mod.rs +++ b/ui/src/components/settings/sub_pages/profile/mod.rs @@ -25,8 +25,10 @@ use kit::elements::{ use kit::layout::modal::Modal; use mime::*; use rfd::FileDialog; +use warp::error::Error; use warp::multipass::identity::IdentityStatus; -use warp::{error::Error, logging::tracing::log}; + +use tracing::log; use crate::components::crop_image_tool::circle_format_tool::CropCircleImageModal; use crate::components::crop_image_tool::rectangle_format_tool::CropRectImageModal; diff --git a/ui/src/layouts/chats/presentation/chat/controls.rs b/ui/src/layouts/chats/presentation/chat/controls.rs index 5f425ef17e0..bf0dafa71e9 100644 --- a/ui/src/layouts/chats/presentation/chat/controls.rs +++ b/ui/src/layouts/chats/presentation/chat/controls.rs @@ -25,7 +25,9 @@ use common::{ use common::language::get_local_text; use uuid::Uuid; -use warp::{crypto::DID, logging::tracing::log, raygun::ConversationType}; +use warp::{crypto::DID, raygun::ConversationType}; + +use tracing::log; enum ControlsCmd { VoiceCall { diff --git a/ui/src/layouts/chats/presentation/chat/edit_group.rs b/ui/src/layouts/chats/presentation/chat/edit_group.rs index 0e6555f2265..b2db5367214 100644 --- a/ui/src/layouts/chats/presentation/chat/edit_group.rs +++ b/ui/src/layouts/chats/presentation/chat/edit_group.rs @@ -19,9 +19,9 @@ use kit::{ }, layout::topbar::Topbar, }; +use tracing::log; use uuid::Uuid; -use warp::{crypto::DID, logging::tracing::log}; - +use warp::crypto::DID; #[derive(PartialEq, Clone)] enum EditGroupAction { Add, diff --git a/ui/src/layouts/chats/presentation/chat/group_users.rs b/ui/src/layouts/chats/presentation/chat/group_users.rs index cfadc83fcf0..70e0c38715c 100644 --- a/ui/src/layouts/chats/presentation/chat/group_users.rs +++ b/ui/src/layouts/chats/presentation/chat/group_users.rs @@ -12,8 +12,8 @@ use kit::{ components::user_image::UserImage, elements::input::{Input, Options}, }; -use warp::{crypto::DID, logging::tracing::log}; - +use tracing::log; +use warp::crypto::DID; #[derive(Props, PartialEq)] pub struct Props { #[props(!optional)] diff --git a/ui/src/layouts/chats/presentation/chat/mod.rs b/ui/src/layouts/chats/presentation/chat/mod.rs index b56c5d8afae..b3a9c67a2a7 100644 --- a/ui/src/layouts/chats/presentation/chat/mod.rs +++ b/ui/src/layouts/chats/presentation/chat/mod.rs @@ -29,8 +29,9 @@ use common::state::{ui, Action, Identity, State}; use common::language::get_local_text; +use tracing::log; use uuid::Uuid; -use warp::{crypto::DID, logging::tracing::log}; +use warp::crypto::DID; #[allow(non_snake_case)] pub fn Compose(cx: Scope) -> Element { diff --git a/ui/src/layouts/chats/presentation/chat/pinned_messages/mod.rs b/ui/src/layouts/chats/presentation/chat/pinned_messages/mod.rs index b2a8d23821d..6871fe7c61e 100644 --- a/ui/src/layouts/chats/presentation/chat/pinned_messages/mod.rs +++ b/ui/src/layouts/chats/presentation/chat/pinned_messages/mod.rs @@ -10,7 +10,9 @@ use dioxus::prelude::*; use futures::StreamExt; use kit::components::{embeds::file_embed::FileEmbed, message::ChatText, user_image::UserImage}; use uuid::Uuid; -use warp::{logging::tracing::log, raygun::PinState}; +use warp::raygun::PinState; + +use tracing::log; use crate::layouts::chats::{ data::{self, ChatData}, diff --git a/ui/src/layouts/chats/presentation/chat/topbar.rs b/ui/src/layouts/chats/presentation/chat/topbar.rs index 887dffd9252..cabade08912 100644 --- a/ui/src/layouts/chats/presentation/chat/topbar.rs +++ b/ui/src/layouts/chats/presentation/chat/topbar.rs @@ -14,7 +14,9 @@ use common::{ use common::language::get_local_text; use uuid::Uuid; -use warp::{logging::tracing::log, raygun::ConversationType}; +use warp::raygun::ConversationType; + +use tracing::log; use crate::{ layouts::chats::data::{get_input_options, ChatData, ChatProps}, diff --git a/ui/src/layouts/chats/presentation/chatbar/mod.rs b/ui/src/layouts/chats/presentation/chatbar/mod.rs index 271ebc60908..6480c78d348 100644 --- a/ui/src/layouts/chats/presentation/chatbar/mod.rs +++ b/ui/src/layouts/chats/presentation/chatbar/mod.rs @@ -30,7 +30,9 @@ use once_cell::sync::Lazy; use regex::Regex; use rfd::FileDialog; use uuid::Uuid; -use warp::{crypto::DID, logging::tracing::log, raygun::Location}; +use warp::{crypto::DID, raygun::Location}; + +use tracing::log; const MAX_CHARS_LIMIT: usize = 1024; pub static EMOJI_REGEX: Lazy = Lazy::new(|| Regex::new(":[^:]{2,}:?$").unwrap()); diff --git a/ui/src/layouts/chats/presentation/messages/mod.rs b/ui/src/layouts/chats/presentation/messages/mod.rs index 85e1aae6e80..0c0a5196e1c 100644 --- a/ui/src/layouts/chats/presentation/messages/mod.rs +++ b/ui/src/layouts/chats/presentation/messages/mod.rs @@ -40,11 +40,12 @@ use uuid::Uuid; use warp::{ constellation::file::File, crypto::DID, - logging::tracing::log, multipass::identity::IdentityStatus, raygun::{self}, }; +use tracing::log; + use crate::{ components::emoji_group::EmojiGroup, layouts::{ diff --git a/ui/src/layouts/chats/presentation/quick_profile/mod.rs b/ui/src/layouts/chats/presentation/quick_profile/mod.rs index 164ffc79183..38398d1b160 100644 --- a/ui/src/layouts/chats/presentation/quick_profile/mod.rs +++ b/ui/src/layouts/chats/presentation/quick_profile/mod.rs @@ -22,7 +22,9 @@ use common::{ use common::language::get_local_text; use uuid::Uuid; -use warp::{crypto::DID, error::Error, logging::tracing::log}; +use warp::{crypto::DID, error::Error}; + +use tracing::log; use crate::{ components::{friends::friends_list::ShareFriendsModal, settings::sidebar::Page}, diff --git a/ui/src/layouts/chats/presentation/sidebar/create_group.rs b/ui/src/layouts/chats/presentation/sidebar/create_group.rs index a8ed1f6058d..05f6e8f9c5e 100644 --- a/ui/src/layouts/chats/presentation/sidebar/create_group.rs +++ b/ui/src/layouts/chats/presentation/sidebar/create_group.rs @@ -1,5 +1,6 @@ use std::collections::{BTreeMap, HashMap, HashSet}; +use crate::{layouts::chats::data::get_input_options, UplinkRoute}; use common::{ icons::outline::Shape as Icon, language::get_local_text, @@ -20,10 +21,9 @@ use kit::{ Appearance, }, }; +use tracing::log; use uuid::Uuid; -use warp::{crypto::DID, logging::tracing::log}; - -use crate::{layouts::chats::data::get_input_options, UplinkRoute}; +use warp::crypto::DID; #[derive(Props)] pub struct Props<'a> { diff --git a/ui/src/layouts/chats/presentation/sidebar/mod.rs b/ui/src/layouts/chats/presentation/sidebar/mod.rs index 89a0bc1cc96..e9a1023ebe1 100644 --- a/ui/src/layouts/chats/presentation/sidebar/mod.rs +++ b/ui/src/layouts/chats/presentation/sidebar/mod.rs @@ -33,10 +33,11 @@ use uuid::Uuid; use warp::raygun::ConversationType; use warp::{ crypto::DID, - logging::tracing::log, raygun::{self}, }; +use tracing::log; + use crate::components::media::calling::CallControl; use crate::layouts::chats::presentation::sidebar::create_group::CreateGroup; diff --git a/ui/src/layouts/friends.rs b/ui/src/layouts/friends.rs index 5bde2abe176..07a28d61959 100644 --- a/ui/src/layouts/friends.rs +++ b/ui/src/layouts/friends.rs @@ -21,7 +21,7 @@ use kit::{ layout::topbar::Topbar, }; use tokio::sync::broadcast::error::RecvError; -use warp::logging::tracing::log; +use tracing::log; #[derive(PartialEq, Clone)] pub enum FriendRoute { diff --git a/ui/src/layouts/log_in/enter_username.rs b/ui/src/layouts/log_in/enter_username.rs index 18874aeae2c..7c8d93b6619 100644 --- a/ui/src/layouts/log_in/enter_username.rs +++ b/ui/src/layouts/log_in/enter_username.rs @@ -15,7 +15,7 @@ use kit::elements::{ button::Button, input::{Input, Options, Validation}, }; -use warp::logging::tracing::log; +use tracing::log; use warp::multipass; use crate::AuthPages; diff --git a/ui/src/layouts/log_in/entry_point.rs b/ui/src/layouts/log_in/entry_point.rs index 3f1cb31a1d7..37efb95df34 100644 --- a/ui/src/layouts/log_in/entry_point.rs +++ b/ui/src/layouts/log_in/entry_point.rs @@ -20,7 +20,9 @@ use kit::{ tooltip::{ArrowPosition, Tooltip}, }, }; -use warp::{logging::tracing::log, multipass}; +use warp::multipass; + +use tracing::log; use common::icons::outline::Shape as Icon; use common::{ diff --git a/ui/src/lib.rs b/ui/src/lib.rs index 0236b300a3f..e6794f8220d 100644 --- a/ui/src/lib.rs +++ b/ui/src/lib.rs @@ -63,7 +63,7 @@ use dioxus_desktop::wry::application::event::Event as WryEvent; use dioxus_desktop::{use_wry_event_handler, DesktopService, PhysicalSize}; use tokio::sync::{mpsc, Mutex}; use tokio::time::{sleep, Duration}; -use warp::logging::tracing::log::{self}; +use tracing::log::{self}; use muda::AboutMetadata; use muda::Menu; diff --git a/ui/src/logger/mod.rs b/ui/src/logger/mod.rs index dbcd01edcd8..921e8b273ed 100644 --- a/ui/src/logger/mod.rs +++ b/ui/src/logger/mod.rs @@ -16,12 +16,12 @@ use colored::Colorize; use env_logger::Builder; use log::{self, Level, SetLoggerError}; use once_cell::sync::Lazy; +use parking_lot::RwLock; use std::fs::OpenOptions; use std::io::prelude::*; use std::path::PathBuf; use std::{collections::VecDeque, env}; use tokio::sync::mpsc; -use warp::sync::RwLock; use chrono::{DateTime, Local}; use common::STATIC_ARGS; diff --git a/ui/src/utils/auto_updater.rs b/ui/src/utils/auto_updater.rs index ac669179e91..2a2a836c5ac 100644 --- a/ui/src/utils/auto_updater.rs +++ b/ui/src/utils/auto_updater.rs @@ -12,7 +12,7 @@ use rfd::FileDialog; use serde::Deserialize; use tokio::io::AsyncWriteExt; use tokio::sync::mpsc; -use warp::logging::tracing::log; +use tracing::log; // these types exist to allow different parts of the app to share the same logic for managing software updates pub struct SoftwareUpdateCmd(pub mpsc::UnboundedReceiver); diff --git a/ui/src/utils/get_drag_event.rs b/ui/src/utils/get_drag_event.rs index 350aef6fc21..1d44847f7ca 100644 --- a/ui/src/utils/get_drag_event.rs +++ b/ui/src/utils/get_drag_event.rs @@ -1,6 +1,6 @@ use dioxus_desktop::wry::webview::FileDropEvent; use once_cell::sync::Lazy; -use warp::sync::RwLock; +use parking_lot::RwLock; pub fn get_drag_event() -> FileDropEvent { DRAG_EVENT.read().clone() diff --git a/ui/src/utils/keyboard/mod.rs b/ui/src/utils/keyboard/mod.rs index 86ebacff7f8..2b6aa12f2bd 100644 --- a/ui/src/utils/keyboard/mod.rs +++ b/ui/src/utils/keyboard/mod.rs @@ -5,7 +5,7 @@ use dioxus_desktop::use_global_shortcut; use dioxus_desktop::wry::application::keyboard::ModifiersState; use once_cell::sync::Lazy; -use warp::sync::RwLock; +use parking_lot::RwLock; pub mod shortcut_handlers; diff --git a/ui/src/utils/mod.rs b/ui/src/utils/mod.rs index 2ed4e44d3a0..807f86418ec 100644 --- a/ui/src/utils/mod.rs +++ b/ui/src/utils/mod.rs @@ -1,7 +1,7 @@ use common::{state, STATIC_ARGS}; use dioxus::prelude::{EvalError, UseEval}; use filetime::FileTime; -use warp::logging::tracing::log; +use tracing::log; use std::{fs, path::Path, rc::Rc}; diff --git a/ui/src/webview_config.rs b/ui/src/webview_config.rs index 868dd1f2f7e..82f1caaa98a 100644 --- a/ui/src/webview_config.rs +++ b/ui/src/webview_config.rs @@ -1,7 +1,7 @@ use crate::utils::get_drag_event::{BLOCK_CANCEL_DRAG_EVENT_FOR_LINUX, DRAG_EVENT}; use common::STATIC_ARGS; use dioxus_desktop::{wry::webview::FileDropEvent, Config}; -use warp::logging::tracing::log; +use tracing::log; pub(crate) fn webview_config() -> Config { let window = crate::window_builder::get_window_builder(true);