build: Don't re-export foreign crates in utils (#4087)
* build(utils): Don't use reexported dependency for internal code, but use the dependency directly. * build(client): Don't use re-exports from `utils` but turn `zellij-utils` dependencies into shared workspace dependencies instead and specify those in `Cargo.toml` explicitly. This gives a much better overview of what component in zellij uses which crates. The previous approach hides a lot of this information since it looks like crates are used in a single place where this isn't actually true. * deps(tile): Don't use re-exports from zellij-utils. * build(zellij): Don't use re-exports from zellij-utils. * build(server): Don't use re-exports from zellij-utils. * build(utils): Don't re-export foreign crates. * docs: Update Changelog with PR #4087. * style: Apply rustfmt. * style: Apply rustfmt. * build(e2e): Don't use re-export from zellij-utils. * test: Restore e2e tests. * style: Apply more formatting.
This commit is contained in:
parent
a2ae82259c
commit
6be8c495bc
48 changed files with 180 additions and 121 deletions
|
|
@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|||
* refactor(terminal): track scroll_region as tuple rather than Option (https://github.com/zellij-org/zellij/pull/4082)
|
||||
* chore(deps): Use workspace dependencies (https://github.com/zellij-org/zellij/pull/4085)
|
||||
* build: Don't use default features (https://github.com/zellij-org/zellij/pull/4086)
|
||||
* build: Don't re-export foreign crates (https://github.com/zellij-org/zellij/pull/4087)
|
||||
|
||||
## [0.42.1] - 2025-03-21
|
||||
* fix(mouse): fix mouse handling in windows terminal (https://github.com/zellij-org/zellij/pull/4076)
|
||||
|
|
|
|||
39
Cargo.lock
generated
39
Cargo.lock
generated
|
|
@ -4976,15 +4976,22 @@ dependencies = [
|
|||
name = "zellij"
|
||||
version = "0.43.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
"dialoguer",
|
||||
"humantime",
|
||||
"insta",
|
||||
"interprocess",
|
||||
"log",
|
||||
"miette",
|
||||
"names",
|
||||
"nix 0.23.1",
|
||||
"rand 0.8.5",
|
||||
"regex",
|
||||
"ssh2",
|
||||
"suggest",
|
||||
"thiserror 1.0.61",
|
||||
"vte 0.11.0",
|
||||
"zellij-client",
|
||||
"zellij-server",
|
||||
"zellij-utils",
|
||||
|
|
@ -4994,13 +5001,23 @@ dependencies = [
|
|||
name = "zellij-client"
|
||||
version = "0.43.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"insta",
|
||||
"interprocess",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"log",
|
||||
"mio 0.7.14",
|
||||
"nix 0.23.1",
|
||||
"notify-debouncer-full",
|
||||
"regex",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_yaml",
|
||||
"signal-hook",
|
||||
"termwiz",
|
||||
"url",
|
||||
"uuid",
|
||||
"zellij-utils",
|
||||
]
|
||||
|
||||
|
|
@ -5009,7 +5026,10 @@ name = "zellij-server"
|
|||
version = "0.43.0"
|
||||
dependencies = [
|
||||
"ansi_term",
|
||||
"anyhow",
|
||||
"arrayvec 0.7.2",
|
||||
"async-channel",
|
||||
"async-std",
|
||||
"async-trait",
|
||||
"base64 0.13.0",
|
||||
"byteorder",
|
||||
|
|
@ -5020,9 +5040,19 @@ dependencies = [
|
|||
"daemonize",
|
||||
"highway",
|
||||
"insta",
|
||||
"interprocess",
|
||||
"isahc",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"log",
|
||||
"nix 0.23.1",
|
||||
"notify-debouncer-full",
|
||||
"prost",
|
||||
"regex",
|
||||
"semver 0.11.0",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"signal-hook",
|
||||
"sixel-image",
|
||||
"sixel-tokenizer",
|
||||
"sysinfo",
|
||||
|
|
@ -5031,6 +5061,7 @@ dependencies = [
|
|||
"unicode-width 0.1.10",
|
||||
"url",
|
||||
"uuid",
|
||||
"vte 0.11.0",
|
||||
"wasmtime",
|
||||
"wasmtime-wasi",
|
||||
"zellij-utils",
|
||||
|
|
@ -5041,6 +5072,7 @@ name = "zellij-tile"
|
|||
version = "0.43.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"prost",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"strum",
|
||||
|
|
@ -5060,7 +5092,6 @@ name = "zellij-utils"
|
|||
version = "0.43.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-channel",
|
||||
"async-std",
|
||||
"backtrace",
|
||||
"bitflags 2.5.0",
|
||||
|
|
@ -5072,29 +5103,24 @@ dependencies = [
|
|||
"curl-sys",
|
||||
"directories",
|
||||
"expect-test",
|
||||
"humantime",
|
||||
"include_dir",
|
||||
"insta",
|
||||
"interprocess",
|
||||
"isahc",
|
||||
"kdl",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"log",
|
||||
"log4rs",
|
||||
"miette",
|
||||
"nix 0.23.1",
|
||||
"notify-debouncer-full",
|
||||
"openssl-sys",
|
||||
"percent-encoding",
|
||||
"prost",
|
||||
"prost-build",
|
||||
"regex",
|
||||
"rmp-serde",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"shellexpand 3.0.0",
|
||||
"signal-hook",
|
||||
"strip-ansi-escapes",
|
||||
"strum",
|
||||
"strum_macros",
|
||||
|
|
@ -5104,7 +5130,6 @@ dependencies = [
|
|||
"unicode-width 0.1.10",
|
||||
"url",
|
||||
"uuid",
|
||||
"vte 0.11.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
|||
21
Cargo.toml
21
Cargo.toml
|
|
@ -17,9 +17,15 @@ rust-version = "1.84"
|
|||
zellij-client = { path = "zellij-client/", version = "0.43.0" }
|
||||
zellij-server = { path = "zellij-server/", version = "0.43.0" }
|
||||
zellij-utils = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
clap = { workspace = true }
|
||||
dialoguer = { version = "0.10.4", default-features = false }
|
||||
humantime = { version = "2.1.0", default-features = false }
|
||||
interprocess = { workspace = true }
|
||||
log = { workspace = true }
|
||||
miette = { workspace = true }
|
||||
names = { version = "0.14.0", default-features = false }
|
||||
nix = { workspace = true }
|
||||
suggest = { version = "0.4.0", default-features = false }
|
||||
thiserror = { workspace = true }
|
||||
|
||||
|
|
@ -28,6 +34,7 @@ insta = { version = "1.6.0", features = ["backtrace"] }
|
|||
ssh2 = "0.9.1"
|
||||
rand = "0.8.0"
|
||||
regex = "1.8.1"
|
||||
vte = { workspace = true }
|
||||
|
||||
[workspace]
|
||||
members = [
|
||||
|
|
@ -52,16 +59,30 @@ members = [
|
|||
[workspace.dependencies]
|
||||
ansi_term = { version = "0.12.1", default-features = false }
|
||||
anyhow = { version = "1.0.70", default-features = false, features = ["backtrace", "std"] }
|
||||
async-std = { version = "1.3.0", default-features = false, features = ["attributes", "default", "std", "unstable"] }
|
||||
clap = { version = "3.2.2", default-features = false, features = ["env", "derive", "color", "std", "suggestions"] }
|
||||
interprocess = { version = "1.2.1", default-features = false }
|
||||
isahc = { version = "1.7.2", default-features = false, features = ["http2", "text-decoding"] }
|
||||
lazy_static = { version = "1.4.0", default-features = false }
|
||||
libc = { version = "0.2", default-features = false, features = ["std"] }
|
||||
log = { version = "0.4.17", default-features = false }
|
||||
miette = { version = "5.7.0", default-features = false, features = ["fancy"] }
|
||||
nix = { version = "0.23.1", default-features = false }
|
||||
notify-debouncer-full = { version = "0.1.0", default-features = false }
|
||||
prost = { version = "0.11.9", default-features = false, features = ["std", "prost-derive"] }
|
||||
regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] }
|
||||
serde = { version = "1.0", default-features = false, features = ["derive", "std"] }
|
||||
serde_json = { version = "1.0", default-features = false, features = ["std"] }
|
||||
signal-hook = { version = "0.3", default-features = false, features = ["iterator"] }
|
||||
strum = { version = "0.20.0", default-features = false }
|
||||
strum_macros = { version = "0.20.0", default-features = false }
|
||||
tempfile = { version = "3.2.0", default-features = false }
|
||||
termwiz = { version = "0.23.2", default-features = false }
|
||||
thiserror = { version = "1.0.40", default-features = false }
|
||||
unicode-width = { version = "0.1.8", default-features = false }
|
||||
url = { version = "2.2.2", default-features = false, features = ["serde"] }
|
||||
uuid = { version = "1.4.1", default-features = false, features = ["serde", "v4", "std"] }
|
||||
vte = { version = "0.11.0", default-features = false }
|
||||
zellij-utils = { path = "zellij-utils/", version = "0.43.0" }
|
||||
|
||||
[profile.dev-opt]
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ use crate::sessions::{
|
|||
print_sessions_with_index, resurrection_layout, session_exists, ActiveSession,
|
||||
SessionNameMatch,
|
||||
};
|
||||
use miette::{Report, Result};
|
||||
use nix;
|
||||
use zellij_client::{
|
||||
old_config_converter::{
|
||||
config_yaml_to_config_kdl, convert_old_yaml_files, layout_yaml_to_layout_kdl,
|
||||
|
|
@ -27,8 +29,6 @@ use zellij_utils::{
|
|||
layout::Layout,
|
||||
options::Options,
|
||||
},
|
||||
miette::{Report, Result},
|
||||
nix,
|
||||
setup::{find_default_config_dir, get_layout_dir, Setup},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ mod sessions;
|
|||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
use clap::Parser;
|
||||
use zellij_utils::{
|
||||
clap::Parser,
|
||||
cli::{CliAction, CliArgs, Command, Sessions},
|
||||
consts::create_config_and_cache_folders,
|
||||
envs,
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
use anyhow;
|
||||
use humantime::format_duration;
|
||||
use interprocess::local_socket::LocalSocketStream;
|
||||
use std::collections::HashMap;
|
||||
use std::os::unix::fs::FileTypeExt;
|
||||
use std::time::{Duration, SystemTime};
|
||||
use std::{fs, io, process};
|
||||
use suggest::Suggest;
|
||||
use zellij_utils::{
|
||||
anyhow,
|
||||
consts::{
|
||||
session_info_folder_for_session, session_layout_cache_file_name,
|
||||
ZELLIJ_SESSION_INFO_CACHE_DIR, ZELLIJ_SOCK_DIR,
|
||||
},
|
||||
envs,
|
||||
humantime::format_duration,
|
||||
input::layout::Layout,
|
||||
interprocess::local_socket::LocalSocketStream,
|
||||
ipc::{ClientToServerMsg, IpcReceiverWithContext, IpcSenderWithContext, ServerToClientMsg},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ use std::collections::HashMap;
|
|||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use vte;
|
||||
use zellij_server::panes::sixel::SixelImageStore;
|
||||
use zellij_server::panes::{LinkHandler, TerminalPane};
|
||||
use zellij_utils::data::{Palette, Style};
|
||||
use zellij_utils::pane_size::{Dimension, PaneGeom, Size, SizeInPixels};
|
||||
use zellij_utils::vte;
|
||||
|
||||
use ssh2::Session;
|
||||
use std::io::prelude::*;
|
||||
|
|
|
|||
|
|
@ -9,12 +9,22 @@ license = "MIT"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
interprocess = { workspace = true }
|
||||
lazy_static = { workspace = true }
|
||||
libc = { workspace = true }
|
||||
log = { workspace = true }
|
||||
mio = { version = "0.7.11", default-features = false, features = ['os-ext'] }
|
||||
nix = { workspace = true }
|
||||
notify-debouncer-full = { workspace = true }
|
||||
regex = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
serde_yaml = { version = "0.8", default-features = false }
|
||||
signal-hook = { workspace = true }
|
||||
termwiz = { workspace = true }
|
||||
url = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
zellij-utils = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ use std::process;
|
|||
use std::{fs, path::PathBuf};
|
||||
|
||||
use crate::os_input_output::ClientOsApi;
|
||||
use uuid::Uuid;
|
||||
use zellij_utils::{
|
||||
errors::prelude::*,
|
||||
input::actions::Action,
|
||||
ipc::{ClientToServerMsg, ExitReason, ServerToClientMsg},
|
||||
uuid::Uuid,
|
||||
};
|
||||
|
||||
pub fn start_cli_client(
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ use crate::{
|
|||
os_input_output::ClientOsApi, stdin_ansi_parser::AnsiStdinInstruction, ClientId,
|
||||
ClientInstruction, CommandIsExecuting, InputInstruction,
|
||||
};
|
||||
use termwiz::input::{InputEvent, Modifiers, MouseButtons, MouseEvent as TermwizMouseEvent};
|
||||
use zellij_utils::{
|
||||
channels::{Receiver, SenderWithContext, OPENCALLS},
|
||||
data::{InputMode, KeyWithModifier},
|
||||
|
|
@ -16,7 +17,6 @@ use zellij_utils::{
|
|||
},
|
||||
ipc::{ClientToServerMsg, ExitReason},
|
||||
position::Position,
|
||||
termwiz::input::{InputEvent, Modifiers, MouseButtons, MouseEvent as TermwizMouseEvent},
|
||||
};
|
||||
|
||||
/// Handles the dispatching of [`Action`]s according to the current
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ use std::sync::{Arc, Mutex};
|
|||
use std::thread;
|
||||
use zellij_utils::errors::FatalError;
|
||||
|
||||
use zellij_utils::notify_debouncer_full::notify::{self, Event, RecursiveMode, Watcher};
|
||||
use notify_debouncer_full::notify::{self, Event, RecursiveMode, Watcher};
|
||||
use zellij_utils::setup::Setup;
|
||||
|
||||
use crate::stdin_ansi_parser::{AnsiStdinInstruction, StdinAnsiParser, SyncOutput};
|
||||
|
|
@ -25,6 +25,7 @@ use crate::{
|
|||
command_is_executing::CommandIsExecuting, input_handler::input_loop,
|
||||
os_input_output::ClientOsApi, stdin_handler::stdin_loop,
|
||||
};
|
||||
use termwiz::input::InputEvent;
|
||||
use zellij_utils::{
|
||||
channels::{self, ChannelWithContext, SenderWithContext},
|
||||
consts::{set_permissions, ZELLIJ_SOCK_DIR},
|
||||
|
|
@ -34,7 +35,6 @@ use zellij_utils::{
|
|||
input::{config::Config, options::Options},
|
||||
ipc::{ClientAttributes, ClientToServerMsg, ExitReason, ServerToClientMsg},
|
||||
pane_size::Size,
|
||||
termwiz::input::InputEvent,
|
||||
};
|
||||
use zellij_utils::{cli::CliArgs, input::layout::Layout};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
use zellij_utils::anyhow::{Context, Result};
|
||||
use anyhow::{Context, Result};
|
||||
use interprocess;
|
||||
use libc;
|
||||
use nix;
|
||||
use signal_hook;
|
||||
use zellij_utils::pane_size::Size;
|
||||
use zellij_utils::{interprocess, libc, nix, signal_hook};
|
||||
|
||||
use interprocess::local_socket::LocalSocketStream;
|
||||
use mio::{unix::SourceFd, Events, Interest, Poll, Token};
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
use std::time::{Duration, Instant};
|
||||
|
||||
const STARTUP_PARSE_DEADLINE_MS: u64 = 500;
|
||||
use lazy_static::lazy_static;
|
||||
use regex::Regex;
|
||||
use zellij_utils::{
|
||||
consts::ZELLIJ_STDIN_CACHE_FILE, ipc::PixelDimensions, lazy_static::lazy_static,
|
||||
pane_size::SizeInPixels, regex::Regex,
|
||||
consts::ZELLIJ_STDIN_CACHE_FILE, ipc::PixelDimensions, pane_size::SizeInPixels,
|
||||
};
|
||||
|
||||
use anyhow::Result;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fs::{File, OpenOptions};
|
||||
use std::io::{Read, Write};
|
||||
use zellij_utils::anyhow::Result;
|
||||
|
||||
/// Describe the terminal implementation of synchronised output
|
||||
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ use crate::os_input_output::ClientOsApi;
|
|||
use crate::stdin_ansi_parser::StdinAnsiParser;
|
||||
use crate::InputInstruction;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use termwiz::input::{InputEvent, InputParser, MouseButtons};
|
||||
use zellij_utils::channels::SenderWithContext;
|
||||
use zellij_utils::termwiz::input::{InputEvent, InputParser, MouseButtons};
|
||||
|
||||
fn send_done_parsing_after_query_timeout(
|
||||
send_input_instructions: SenderWithContext<InputInstruction>,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,10 @@ license = "MIT"
|
|||
|
||||
[dependencies]
|
||||
ansi_term = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
arrayvec = { version = "0.7.2", default-features = false, features = ["std"] }
|
||||
async-channel = { version = "1.8.0", default-features = false }
|
||||
async-std = { workspace = true }
|
||||
async-trait = { version = "0.1.50", default-features = false }
|
||||
base64 = { version = "0.13.0", default-features = false, features = ["std"] }
|
||||
byteorder = { version = "1.4.3", default-features = false, features = ["std"] }
|
||||
|
|
@ -20,16 +23,28 @@ chrono = { version = "0.4.19", default-features = false, features = ["std", "clo
|
|||
close_fds = { version = "0.3.2", default-features = false }
|
||||
daemonize = { version = "0.5", default-features = false }
|
||||
highway = { version = "0.6.4", default-features = false, features = ["std"] }
|
||||
interprocess = { workspace = true }
|
||||
isahc = { workspace = true }
|
||||
lazy_static = { workspace = true }
|
||||
libc = { workspace = true }
|
||||
log = { workspace = true }
|
||||
nix = { workspace = true }
|
||||
notify-debouncer-full = { workspace = true }
|
||||
prost = { workspace = true }
|
||||
regex = { workspace = true }
|
||||
semver = { version = "0.11.0", default-features = false }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
signal-hook = { workspace = true }
|
||||
sixel-image = { version = "0.1.0", default-features = false }
|
||||
sixel-tokenizer = { version = "0.1.0", default-features = false }
|
||||
sysinfo = { version = "0.22.5", default-features = false }
|
||||
tempfile = { workspace = true }
|
||||
typetag = { version = "0.1.7", default-features = false }
|
||||
unicode-width = { workspace = true }
|
||||
url = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
vte = { workspace = true }
|
||||
wasmtime-wasi = { version = "29.0.1", default-features = false, features = ["preview1"] } # Keep in sync with wasmtime
|
||||
zellij-utils = { workspace = true }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use zellij_utils::async_std::task;
|
||||
use async_std::task;
|
||||
use zellij_utils::consts::{
|
||||
session_info_cache_file_name, session_info_folder_for_session, session_layout_cache_file_name,
|
||||
ZELLIJ_SESSION_INFO_CACHE_DIR, ZELLIJ_SOCK_DIR,
|
||||
|
|
@ -7,9 +7,9 @@ use zellij_utils::data::{Event, HttpVerb, SessionInfo};
|
|||
use zellij_utils::errors::{prelude::*, BackgroundJobContext, ContextType};
|
||||
use zellij_utils::input::layout::RunPlugin;
|
||||
|
||||
use zellij_utils::isahc::prelude::*;
|
||||
use zellij_utils::isahc::AsyncReadResponseExt;
|
||||
use zellij_utils::isahc::{config::RedirectPolicy, HttpClient, Request};
|
||||
use isahc::prelude::*;
|
||||
use isahc::AsyncReadResponseExt;
|
||||
use isahc::{config::RedirectPolicy, HttpClient, Request};
|
||||
|
||||
use std::collections::{BTreeMap, HashMap};
|
||||
use std::fs;
|
||||
|
|
@ -291,7 +291,7 @@ pub(crate) fn background_jobs_main(
|
|||
http_client: HttpClient,
|
||||
) -> Result<
|
||||
(u16, BTreeMap<String, String>, Vec<u8>), // status_code, headers, body
|
||||
zellij_utils::isahc::Error,
|
||||
isahc::Error,
|
||||
> {
|
||||
let mut request = match verb {
|
||||
HttpVerb::Get => Request::get(url),
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ mod ui;
|
|||
|
||||
use background_jobs::{background_jobs_main, BackgroundJob};
|
||||
use log::info;
|
||||
use nix::sys::stat::{umask, Mode};
|
||||
use pty_writer::{pty_writer_main, PtyWriteInstruction};
|
||||
use std::collections::{BTreeMap, HashMap, HashSet};
|
||||
use std::{
|
||||
|
|
@ -25,7 +26,6 @@ use std::{
|
|||
thread,
|
||||
};
|
||||
use zellij_utils::envs;
|
||||
use zellij_utils::nix::sys::stat::{umask, Mode};
|
||||
use zellij_utils::pane_size::Size;
|
||||
|
||||
use wasmtime::{Config as WasmtimeConfig, Engine, Strategy};
|
||||
|
|
@ -555,9 +555,8 @@ pub fn start_server(mut os_input: Box<dyn ServerOsApi>, socket_path: PathBuf) {
|
|||
let _ = thread::Builder::new()
|
||||
.name("server_listener".to_string())
|
||||
.spawn({
|
||||
use zellij_utils::{
|
||||
interprocess::local_socket::LocalSocketListener, shared::set_permissions,
|
||||
};
|
||||
use interprocess::local_socket::LocalSocketListener;
|
||||
use zellij_utils::shared::set_permissions;
|
||||
|
||||
let os_input = os_input.clone();
|
||||
let session_data = session_data.clone();
|
||||
|
|
|
|||
|
|
@ -2,14 +2,13 @@ use std::{collections::VecDeque, io::Write};
|
|||
|
||||
use crate::plugins::PluginId;
|
||||
use log::{debug, error};
|
||||
use zellij_utils::{errors::prelude::*, serde};
|
||||
use zellij_utils::errors::prelude::*;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
// 16kB log buffer
|
||||
const ZELLIJ_MAX_PIPE_BUFFER_SIZE: usize = 16_384;
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[serde(crate = "self::serde")]
|
||||
pub struct LoggingPipe {
|
||||
buffer: VecDeque<u8>,
|
||||
plugin_name: String,
|
||||
|
|
|
|||
|
|
@ -11,23 +11,25 @@ use nix::{
|
|||
unistd,
|
||||
};
|
||||
|
||||
use async_std;
|
||||
use interprocess;
|
||||
use libc;
|
||||
use nix;
|
||||
use signal_hook;
|
||||
use signal_hook::consts::*;
|
||||
use sysinfo::{ProcessExt, ProcessRefreshKind, System, SystemExt};
|
||||
use tempfile::tempfile;
|
||||
use zellij_utils::{
|
||||
async_std, channels,
|
||||
channels,
|
||||
channels::TrySendError,
|
||||
data::Palette,
|
||||
errors::prelude::*,
|
||||
input::command::{RunCommand, TerminalAction},
|
||||
interprocess,
|
||||
ipc::{
|
||||
ClientToServerMsg, ExitReason, IpcReceiverWithContext, IpcSenderWithContext,
|
||||
ServerToClientMsg,
|
||||
},
|
||||
libc, nix,
|
||||
shared::default_palette,
|
||||
signal_hook,
|
||||
tempfile::tempfile,
|
||||
};
|
||||
|
||||
use std::{
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
use super::sixel::{PixelRect, SixelGrid, SixelImageStore};
|
||||
use regex::Regex;
|
||||
use std::borrow::Cow;
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
use std::rc::Rc;
|
||||
use zellij_utils::data::Style;
|
||||
use zellij_utils::errors::prelude::*;
|
||||
use zellij_utils::regex::Regex;
|
||||
|
||||
use std::{
|
||||
cmp::Ordering,
|
||||
|
|
@ -14,13 +14,13 @@ use std::{
|
|||
str,
|
||||
};
|
||||
|
||||
use vte;
|
||||
use zellij_utils::{
|
||||
consts::{DEFAULT_SCROLL_BUFFER_SIZE, SCROLL_BUFFER_SIZE},
|
||||
data::{Palette, PaletteColor, Styling},
|
||||
input::mouse::{MouseEvent, MouseEventType},
|
||||
pane_size::SizeInPixels,
|
||||
position::Position,
|
||||
vte,
|
||||
};
|
||||
|
||||
const TABSTOP_WIDTH: usize = 8; // TODO: is this always right?
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ use crate::ui::{
|
|||
use crate::ClientId;
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
use vte;
|
||||
use zellij_utils::data::{
|
||||
BareKey, KeyWithModifier, PermissionStatus, PermissionType, PluginPermission,
|
||||
};
|
||||
|
|
@ -31,7 +32,6 @@ use zellij_utils::{
|
|||
input::mouse::{MouseEvent, MouseEventType},
|
||||
pane_size::PaneGeom,
|
||||
shared::make_terminal_title,
|
||||
vte,
|
||||
};
|
||||
|
||||
macro_rules! style {
|
||||
|
|
|
|||
|
|
@ -5,12 +5,10 @@ use std::rc::Rc;
|
|||
use unicode_width::UnicodeWidthChar;
|
||||
|
||||
use unicode_width::UnicodeWidthStr;
|
||||
use vte::ParamsIter;
|
||||
use zellij_utils::data::StyleDeclaration;
|
||||
use zellij_utils::data::{PaletteColor, Style};
|
||||
use zellij_utils::input::command::RunCommand;
|
||||
use zellij_utils::{
|
||||
data::{PaletteColor, Style},
|
||||
vte::ParamsIter,
|
||||
};
|
||||
|
||||
use crate::panes::alacritty_functions::parse_sgr_color;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ use std::collections::{HashMap, HashSet};
|
|||
use std::fmt::Debug;
|
||||
use std::rc::Rc;
|
||||
use std::time::{self, Instant};
|
||||
use vte;
|
||||
use zellij_utils::input::command::RunCommand;
|
||||
use zellij_utils::input::mouse::{MouseEvent, MouseEventType};
|
||||
use zellij_utils::pane_size::Offset;
|
||||
|
|
@ -27,7 +28,6 @@ use zellij_utils::{
|
|||
pane_size::SizeInPixels,
|
||||
position::Position,
|
||||
shared::make_terminal_title,
|
||||
vte,
|
||||
};
|
||||
|
||||
use crate::ui::pane_boundaries_frame::{FrameParams, PaneFrame};
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ use ::insta::assert_snapshot;
|
|||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
use std::rc::Rc;
|
||||
use vte;
|
||||
use zellij_utils::{
|
||||
data::{Palette, Style},
|
||||
pane_size::SizeInPixels,
|
||||
position::Position,
|
||||
vte,
|
||||
};
|
||||
|
||||
use std::fmt::Write;
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ use crate::{pty::PtyInstruction, thread_bus::Bus, ClientId, ServerInstruction};
|
|||
pub use wasm_bridge::PluginRenderAsset;
|
||||
use wasm_bridge::WasmBridge;
|
||||
|
||||
use async_std::{channel, future::timeout, task};
|
||||
use zellij_utils::{
|
||||
async_std::{channel, future::timeout, task},
|
||||
data::{
|
||||
ClientInfo, Event, EventType, InputMode, MessageToPlugin, PermissionStatus, PermissionType,
|
||||
PipeMessage, PipeSource, PluginCapabilities,
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ use std::collections::{HashMap, HashSet};
|
|||
use zellij_utils::data::{PipeMessage, PipeSource};
|
||||
use zellij_utils::plugin_api::pipe_message::ProtobufPipeMessage;
|
||||
|
||||
use prost::Message;
|
||||
use zellij_utils::errors::prelude::*;
|
||||
use zellij_utils::prost::Message;
|
||||
|
||||
use crate::{thread_bus::ThreadSenders, ClientId};
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ use crate::plugins::zellij_exports::{wasi_write_object, zellij_exports};
|
|||
use crate::plugins::PluginId;
|
||||
use highway::{HighwayHash, PortableHash};
|
||||
use log::info;
|
||||
use prost::Message;
|
||||
use std::{
|
||||
collections::{HashMap, HashSet, VecDeque},
|
||||
fs,
|
||||
|
|
@ -16,7 +17,6 @@ use url::Url;
|
|||
use wasmtime::{Engine, Instance, Linker, Module, Store};
|
||||
use wasmtime_wasi::{preview1::WasiP1Ctx, DirPerms, FilePerms, WasiCtxBuilder};
|
||||
use zellij_utils::consts::ZELLIJ_PLUGIN_ARTIFACT_DIR;
|
||||
use zellij_utils::prost::Message;
|
||||
|
||||
use crate::{
|
||||
logging_pipe::LoggingPipe, screen::ScreenInstruction, thread_bus::ThreadSenders,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use wasmtime_wasi::{
|
|||
|
||||
use crate::{thread_bus::ThreadSenders, ClientId};
|
||||
|
||||
use zellij_utils::async_channel::Sender;
|
||||
use async_channel::Sender;
|
||||
use zellij_utils::{
|
||||
data::EventType,
|
||||
data::InputMode,
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ use crate::plugins::plugin_map::PluginEnv;
|
|||
use crate::plugins::zellij_exports::wasi_write_object;
|
||||
use wasmtime::{Instance, Store};
|
||||
|
||||
use zellij_utils::async_channel::{unbounded, Receiver, Sender};
|
||||
use zellij_utils::async_std::task;
|
||||
use async_channel::{unbounded, Receiver, Sender};
|
||||
use async_std::task;
|
||||
use prost::Message;
|
||||
use zellij_utils::errors::prelude::*;
|
||||
use zellij_utils::plugin_api::message::ProtobufMessage;
|
||||
use zellij_utils::prost::Message;
|
||||
|
||||
pub struct RunningWorker {
|
||||
pub instance: Instance,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ use super::plugin_thread_main;
|
|||
use crate::screen::ScreenInstruction;
|
||||
use crate::{channels::SenderWithContext, thread_bus::Bus, ServerInstruction};
|
||||
use insta::assert_snapshot;
|
||||
use lazy_static::lazy_static;
|
||||
use std::collections::BTreeMap;
|
||||
use std::path::PathBuf;
|
||||
use tempfile::tempdir;
|
||||
|
|
@ -18,7 +19,6 @@ use zellij_utils::input::layout::{
|
|||
use zellij_utils::input::permission::PermissionCache;
|
||||
use zellij_utils::input::plugins::PluginAliases;
|
||||
use zellij_utils::ipc::ClientAttributes;
|
||||
use zellij_utils::lazy_static::lazy_static;
|
||||
use zellij_utils::pane_size::Size;
|
||||
|
||||
use crate::background_jobs::BackgroundJob;
|
||||
|
|
|
|||
|
|
@ -8,8 +8,11 @@ use crate::plugins::plugin_map::{AtomicEvent, PluginEnv, PluginMap, RunningPlugi
|
|||
use crate::plugins::plugin_worker::MessageToWorker;
|
||||
use crate::plugins::watch_filesystem::watch_filesystem;
|
||||
use crate::plugins::zellij_exports::{wasi_read_string, wasi_write_object};
|
||||
use async_channel::Sender;
|
||||
use async_std::task::{self, JoinHandle};
|
||||
use highway::{HighwayHash, PortableHash};
|
||||
use log::info;
|
||||
use notify_debouncer_full::{notify::RecommendedWatcher, Debouncer, FileIdMap};
|
||||
use std::{
|
||||
collections::{BTreeMap, HashMap, HashSet},
|
||||
path::PathBuf,
|
||||
|
|
@ -17,17 +20,14 @@ use std::{
|
|||
sync::{Arc, Mutex},
|
||||
};
|
||||
use wasmtime::{Engine, Module};
|
||||
use zellij_utils::async_channel::Sender;
|
||||
use zellij_utils::async_std::task::{self, JoinHandle};
|
||||
use zellij_utils::consts::{ZELLIJ_CACHE_DIR, ZELLIJ_TMP_DIR};
|
||||
use zellij_utils::data::{InputMode, PermissionStatus, PermissionType, PipeMessage, PipeSource};
|
||||
use zellij_utils::downloader::Downloader;
|
||||
use zellij_utils::input::keybinds::Keybinds;
|
||||
use zellij_utils::input::permission::PermissionCache;
|
||||
use zellij_utils::notify_debouncer_full::{notify::RecommendedWatcher, Debouncer, FileIdMap};
|
||||
use zellij_utils::plugin_api::event::ProtobufEvent;
|
||||
|
||||
use zellij_utils::prost::Message;
|
||||
use prost::Message;
|
||||
|
||||
use crate::panes::PaneId;
|
||||
use crate::{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use crate::thread_bus::ThreadSenders;
|
|||
use std::path::Path;
|
||||
use std::time::Duration;
|
||||
|
||||
use zellij_utils::notify_debouncer_full::{
|
||||
use notify_debouncer_full::{
|
||||
new_debouncer,
|
||||
notify::{EventKind, RecommendedWatcher, RecursiveMode, Watcher},
|
||||
DebounceEventResult, Debouncer, FileIdMap,
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ use crate::plugins::wasm_bridge::handle_plugin_crash;
|
|||
use crate::pty::{ClientTabIndexOrPaneId, PtyInstruction};
|
||||
use crate::route::route_action;
|
||||
use crate::ServerInstruction;
|
||||
use async_std::task;
|
||||
use interprocess::local_socket::LocalSocketStream;
|
||||
use log::warn;
|
||||
use serde::Serialize;
|
||||
use std::{
|
||||
|
|
@ -22,14 +24,11 @@ use zellij_utils::data::{
|
|||
MessageToPlugin, OriginatingPlugin, PermissionStatus, PermissionType, PluginPermission,
|
||||
};
|
||||
use zellij_utils::input::permission::PermissionCache;
|
||||
use zellij_utils::{
|
||||
async_std::task,
|
||||
interprocess::local_socket::LocalSocketStream,
|
||||
ipc::{ClientToServerMsg, IpcSenderWithContext},
|
||||
};
|
||||
use zellij_utils::ipc::{ClientToServerMsg, IpcSenderWithContext};
|
||||
|
||||
use crate::{panes::PaneId, screen::ScreenInstruction};
|
||||
|
||||
use prost::Message;
|
||||
use zellij_utils::{
|
||||
consts::{VERSION, ZELLIJ_SESSION_INFO_CACHE_DIR, ZELLIJ_SOCK_DIR},
|
||||
data::{
|
||||
|
|
@ -46,8 +45,6 @@ use zellij_utils::{
|
|||
plugin_command::ProtobufPluginCommand,
|
||||
plugin_ids::{ProtobufPluginIds, ProtobufZellijVersion},
|
||||
},
|
||||
prost::Message,
|
||||
serde,
|
||||
};
|
||||
|
||||
macro_rules! apply_action {
|
||||
|
|
|
|||
|
|
@ -8,12 +8,14 @@ use crate::{
|
|||
thread_bus::{Bus, ThreadSenders},
|
||||
ClientId, ServerInstruction,
|
||||
};
|
||||
use async_std::task::{self, JoinHandle};
|
||||
use async_std::{
|
||||
self,
|
||||
task::{self, JoinHandle},
|
||||
};
|
||||
use nix::unistd::Pid;
|
||||
use std::sync::Arc;
|
||||
use std::{collections::HashMap, os::unix::io::RawFd, path::PathBuf};
|
||||
use zellij_utils::nix::unistd::Pid;
|
||||
use zellij_utils::{
|
||||
async_std,
|
||||
data::{Event, FloatingPaneCoordinates, OriginatingPlugin},
|
||||
errors::prelude::*,
|
||||
errors::{ContextType, PtyContext},
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
use zellij_utils::{anyhow::Result, data::CopyDestination, input::options::Clipboard};
|
||||
use anyhow::Result;
|
||||
use zellij_utils::{data::CopyDestination, input::options::Clipboard};
|
||||
|
||||
use crate::ClientId;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use std::io::prelude::*;
|
||||
use std::process::{Command, Stdio};
|
||||
|
||||
use zellij_utils::anyhow::{Context, Result};
|
||||
use anyhow::{Context, Result};
|
||||
|
||||
pub struct CopyCommand {
|
||||
command: String,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ mod layout_applier;
|
|||
mod swap_layouts;
|
||||
|
||||
use copy_command::CopyCommand;
|
||||
use serde;
|
||||
use std::env::temp_dir;
|
||||
use std::path::PathBuf;
|
||||
use uuid::Uuid;
|
||||
|
|
@ -17,8 +18,8 @@ use zellij_utils::data::{
|
|||
use zellij_utils::errors::prelude::*;
|
||||
use zellij_utils::input::command::RunCommand;
|
||||
use zellij_utils::input::mouse::{MouseEvent, MouseEventType};
|
||||
use zellij_utils::position::Position;
|
||||
use zellij_utils::position::{Column, Line};
|
||||
use zellij_utils::{position::Position, serde};
|
||||
|
||||
use crate::background_jobs::BackgroundJob;
|
||||
use crate::pty_writer::PtyWriteInstruction;
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ use std::collections::{BTreeMap, HashMap, HashSet};
|
|||
use std::os::unix::io::RawFd;
|
||||
use std::rc::Rc;
|
||||
|
||||
use interprocess::local_socket::LocalSocketStream;
|
||||
use zellij_utils::{
|
||||
data::{InputMode, ModeInfo, Palette, Style},
|
||||
input::command::{RunCommand, TerminalAction},
|
||||
interprocess::local_socket::LocalSocketStream,
|
||||
ipc::{ClientToServerMsg, ServerToClientMsg},
|
||||
};
|
||||
|
||||
|
|
@ -746,7 +746,7 @@ fn read_fixture(fixture_name: &str) -> Vec<u8> {
|
|||
use crate::panes::grid::Grid;
|
||||
use crate::panes::link_handler::LinkHandler;
|
||||
use insta::assert_snapshot;
|
||||
use zellij_utils::vte;
|
||||
use vte;
|
||||
|
||||
fn take_snapshot(ansi_instructions: &str, rows: usize, columns: usize, palette: Palette) -> String {
|
||||
let sixel_image_store = Rc::new(RefCell::new(SixelImageStore::default()));
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ use std::collections::{HashMap, HashSet};
|
|||
use std::os::unix::io::RawFd;
|
||||
use std::rc::Rc;
|
||||
|
||||
use interprocess::local_socket::LocalSocketStream;
|
||||
use zellij_utils::{
|
||||
data::{ModeInfo, Palette, Style},
|
||||
input::command::{RunCommand, TerminalAction},
|
||||
interprocess::local_socket::LocalSocketStream,
|
||||
ipc::{ClientToServerMsg, ServerToClientMsg},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ use std::{
|
|||
time::{Duration, Instant},
|
||||
};
|
||||
use zellij_utils::{
|
||||
async_std,
|
||||
errors::{get_current_ctx, prelude::*, ContextType},
|
||||
logging::debug_to_file,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,8 +5,11 @@ mod table;
|
|||
mod text;
|
||||
|
||||
use crate::panes::grid::Grid;
|
||||
use lazy_static::lazy_static;
|
||||
use regex::Regex;
|
||||
use vte;
|
||||
use zellij_utils::data::Style;
|
||||
use zellij_utils::errors::prelude::*;
|
||||
use zellij_utils::{data::Style, lazy_static::lazy_static, regex::Regex, vte};
|
||||
|
||||
use component_coordinates::{is_too_high, is_too_wide, Coordinates};
|
||||
use nested_list::{nested_list, parse_nested_list_items};
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ use crate::{
|
|||
};
|
||||
use zellij_utils::ipc::PixelDimensions;
|
||||
|
||||
use interprocess::local_socket::LocalSocketStream;
|
||||
use zellij_utils::{
|
||||
channels::{self, ChannelWithContext, Receiver},
|
||||
data::{Direction, FloatingPaneCoordinates, InputMode, ModeInfo, Palette, PluginCapabilities},
|
||||
interprocess::local_socket::LocalSocketStream,
|
||||
ipc::{ClientAttributes, ClientToServerMsg, ServerToClientMsg},
|
||||
};
|
||||
|
||||
|
|
@ -48,7 +48,6 @@ use crate::panes::sixel::SixelImageStore;
|
|||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
use std::rc::Rc;
|
||||
use zellij_utils::vte;
|
||||
|
||||
fn take_snapshot_and_cursor_coordinates(
|
||||
ansi_instructions: &str,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ license = "MIT"
|
|||
|
||||
[dependencies]
|
||||
clap = { workspace = true }
|
||||
prost = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
strum = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use zellij_utils::plugin_api::plugin_command::ProtobufPluginCommand;
|
|||
use zellij_utils::plugin_api::plugin_ids::{ProtobufPluginIds, ProtobufZellijVersion};
|
||||
|
||||
pub use super::ui_components::*;
|
||||
pub use zellij_utils::prost::{self, *};
|
||||
pub use prost::{self, *};
|
||||
|
||||
// Subscription Handling
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ mod ribbon;
|
|||
mod table;
|
||||
mod text;
|
||||
|
||||
pub use prost::{self, *};
|
||||
pub use zellij_utils::plugin_api;
|
||||
pub use zellij_utils::prost::{self, *};
|
||||
|
||||
pub use nested_list::*;
|
||||
pub use ribbon::*;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ include = ["src/**/*", "assets/"]
|
|||
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
async-channel = { version = "1.8.0", default-features = false }
|
||||
backtrace = { version = "0.3.55", default-features = false, features = ["std"] }
|
||||
bitflags = { version = "2.5.0", default-features = false }
|
||||
clap = { workspace = true }
|
||||
|
|
@ -22,14 +21,12 @@ crossbeam = { version = "0.8.1", default-features = false, features = ["alloc",
|
|||
directories = { version = "5.0", default-features = false }
|
||||
include_dir = { version = "0.7.3", default-features = false }
|
||||
kdl = { version = "4.5.0", default-features = false, features = ["span"] }
|
||||
lazy_static = { version = "1.4.0", default-features = false }
|
||||
libc = { version = "0.2", default-features = false, features = ["std"] }
|
||||
lazy_static = { workspace = true }
|
||||
log = { workspace = true }
|
||||
miette = { version = "5.7.0", default-features = false, features = ["fancy"] }
|
||||
nix = { version = "0.23.1", default-features = false }
|
||||
miette = { workspace = true }
|
||||
nix = { workspace = true }
|
||||
percent-encoding = { version = "2.1.0", default-features = false, features = ["std"] }
|
||||
prost = { version = "0.11.9", default-features = false, features = ["std", "prost-derive"] }
|
||||
regex = { version = "1.5.5", default-features = false, features = ["perf", "std"] }
|
||||
prost = { workspace = true }
|
||||
rmp-serde = { version = "1.1.0", default-features = false }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
|
|
@ -37,23 +34,19 @@ shellexpand = { version = "3.0.0", default-features = false, features = ["base-0
|
|||
strip-ansi-escapes = { version = "0.1.0", default-features = false }
|
||||
strum = { workspace = true }
|
||||
strum_macros = { workspace = true }
|
||||
tempfile = { version = "3.2.0", default-features = false }
|
||||
tempfile = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
unicode-width = { workspace = true }
|
||||
url = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
vte = { version = "0.11.0", default-features = false }
|
||||
|
||||
[target.'cfg(not(target_family = "wasm"))'.dependencies]
|
||||
termwiz = { version = "0.23.2", default-features = false }
|
||||
async-std = { workspace = true }
|
||||
log4rs = { version = "1.2.0", default-features = false, features = ["pattern_encoder", "rolling_file_appender", "compound_policy", "fixed_window_roller", "size_trigger"] }
|
||||
notify-debouncer-full = { version = "0.1.0", default-features = false }
|
||||
signal-hook = { version = "0.3", default-features = false, features = ["iterator"] }
|
||||
interprocess = { version = "1.2.1", default-features = false }
|
||||
async-std = { version = "1.3.0", default-features = false, features = ["attributes", "default", "std", "unstable"] }
|
||||
humantime = { version = "2.1.0", default-features = false }
|
||||
termwiz = { workspace = true }
|
||||
interprocess = { workspace = true }
|
||||
openssl-sys = { version = "0.9.93", default-features = false, features = ["vendored"], optional = true }
|
||||
isahc = { version = "1.7.2", default-features = false, features = ["http2", "text-decoding"] }
|
||||
isahc = { workspace = true }
|
||||
curl-sys = { version = "0.4", default-features = false, features = ["force-system-lib-on-osx", "ssl"], optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
|
|||
|
|
@ -785,7 +785,7 @@ mod not_wasm {
|
|||
/// Helper trait to convert error types that don't satisfy `anyhow`s trait requirements to
|
||||
/// anyhow errors.
|
||||
pub trait ToAnyhow<U> {
|
||||
fn to_anyhow(self) -> crate::anyhow::Result<U>;
|
||||
fn to_anyhow(self) -> anyhow::Result<U>;
|
||||
}
|
||||
|
||||
/// `SendError` doesn't satisfy `anyhow`s trait requirements due to `T` possibly being a
|
||||
|
|
@ -798,19 +798,19 @@ mod not_wasm {
|
|||
impl<T: std::fmt::Debug, U> ToAnyhow<U>
|
||||
for Result<U, crate::channels::SendError<(T, ErrorContext)>>
|
||||
{
|
||||
fn to_anyhow(self) -> crate::anyhow::Result<U> {
|
||||
fn to_anyhow(self) -> anyhow::Result<U> {
|
||||
match self {
|
||||
Ok(val) => crate::anyhow::Ok(val),
|
||||
Ok(val) => anyhow::Ok(val),
|
||||
Err(e) => {
|
||||
let (msg, context) = e.into_inner();
|
||||
if *crate::consts::DEBUG_MODE.get().unwrap_or(&true) {
|
||||
Err(crate::anyhow::anyhow!(
|
||||
Err(anyhow::anyhow!(
|
||||
"failed to send message to channel: {:#?}",
|
||||
msg
|
||||
))
|
||||
.with_context(|| context.to_string())
|
||||
} else {
|
||||
Err(crate::anyhow::anyhow!("failed to send message to channel"))
|
||||
Err(anyhow::anyhow!("failed to send message to channel"))
|
||||
.with_context(|| context.to_string())
|
||||
}
|
||||
},
|
||||
|
|
@ -819,16 +819,14 @@ mod not_wasm {
|
|||
}
|
||||
|
||||
impl<U> ToAnyhow<U> for Result<U, std::sync::PoisonError<U>> {
|
||||
fn to_anyhow(self) -> crate::anyhow::Result<U> {
|
||||
fn to_anyhow(self) -> anyhow::Result<U> {
|
||||
match self {
|
||||
Ok(val) => crate::anyhow::Ok(val),
|
||||
Ok(val) => anyhow::Ok(val),
|
||||
Err(e) => {
|
||||
if *crate::consts::DEBUG_MODE.get().unwrap_or(&true) {
|
||||
Err(crate::anyhow::anyhow!(
|
||||
"cannot acquire poisoned lock for {e:#?}"
|
||||
))
|
||||
Err(anyhow::anyhow!("cannot acquire poisoned lock for {e:#?}"))
|
||||
} else {
|
||||
Err(crate::anyhow::anyhow!("cannot acquire poisoned lock"))
|
||||
Err(anyhow::anyhow!("cannot acquire poisoned lock"))
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,12 +24,3 @@ pub mod downloader; // Requires async_std
|
|||
pub mod ipc; // Requires interprocess
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub mod logging; // Requires log4rs
|
||||
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub use ::{
|
||||
anyhow, async_channel, async_std, clap, humantime, interprocess, isahc, lazy_static, libc,
|
||||
miette, nix, notify_debouncer_full, regex, serde, signal_hook, tempfile, termwiz, url, uuid,
|
||||
vte,
|
||||
};
|
||||
|
||||
pub use ::prost;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue