Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make incompatible version message more clear #2377

Merged
merged 1 commit into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ panic = "unwind"

[workspace.dependencies]
ansi-to-tui = "7.0.0"
anyhow = "1.0.95"
anyhow = "1.0.96"
base64 = "0.22.1"
bitflags = "2.8.0"
clap = { version = "4.5.29", features = [ "derive" ] }
clap = { version = "4.5.30", features = [ "derive" ] }
core-foundation-sys = "0.8.7"
crossterm = { version = "0.28.1", features = [ "event-stream" ] }
dirs = "6.0.0"
Expand All @@ -35,8 +35,8 @@ parking_lot = "0.12.3"
ratatui = { version = "0.29.0", features = [ "unstable-rendered-line-info" ] }
regex = "1.11.1"
scopeguard = "1.2.0"
serde = { version = "1.0.217", features = [ "derive" ] }
serde_json = "1.0.138"
serde = { version = "1.0.218", features = [ "derive" ] }
serde_json = "1.0.139"
tokio = { version = "1.43.0", features = [ "full" ] }
tokio-stream = "0.1.17"
tokio-util = "0.7.13"
Expand Down
2 changes: 1 addition & 1 deletion cspell.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"0.2","language":"en","flagWords":[],"words":["Punct","KEYMAP","splitn","crossterm","YAZI","peekable","ratatui","syntect","pbpaste","pbcopy","oneshot","Posix","Lsar","XADDOS","zoxide","cands","Deque","precache","imageops","IFBLK","IFCHR","IFDIR","IFIFO","IFLNK","IFMT","IFSOCK","IRGRP","IROTH","IRUSR","ISGID","ISUID","ISVTX","IWGRP","IWOTH","IWUSR","IXGRP","IXOTH","IXUSR","libc","winsize","TIOCGWINSZ","xpixel","ypixel","ioerr","appender","Catppuccin","macchiato","gitmodules","Dotfiles","bashprofile","vimrc","flac","webp","exiftool","mediainfo","ripgrep","indexmap","indexmap","unwatch","canonicalize","serde","fsevent","Ueberzug","iterm","wezterm","sixel","chafa","ueberzugpp","Konsole","Alacritty","Überzug","pkgs","pdftoppm","poppler","prebuild","singlefile","jpegopt","EXIF","rustfmt","mktemp","nanos","xclip","xsel","natord","Mintty","nixos","nixpkgs","SIGTSTP","SIGCONT","SIGCONT","mlua","nonstatic","userdata","metatable","natsort","backstack","luajit","Succ","Succ","cand","fileencoding","foldmethod","lightgreen","darkgray","lightred","lightyellow","lightcyan","nushell","msvc","aarch","linemode","sxyazi","rsplit","ZELLIJ","bitflags","bitflags","USERPROFILE","Neovim","vergen","gitcl","Renderable","preloaders","prec","Upserting","prio","Ghostty","Catmull","Lanczos","cmds","unyank","scrolloff","headsup","unsub","uzers","scopeguard","SPDLOG","globset","filetime","magick","magick","prefetcher","Prework","prefetchers","PREWORKERS","conds","translit","rxvt","Urxvt","realpath","realname","REPARSE","hardlink","hardlinking","nlink","nlink","linemodes","SIGSTOP","sevenzip","rsplitn","replacen","DECSET","DECRQM","repeek","cwds","tcsi","Hyprland","Wayfire","SWAYSOCK","btime","nsec","codegen","gethostname","fchmod","fdfind","Rustc","rustc","ffprobe","vframes","luma","obase","outln","errln","tmtheme","twox","cfgs","fstype","objc","rdev","runloop","exfat","rclone","DECRQSS","DECSCUSR","libvterm"]}
{"version":"0.2","language":"en","flagWords":[],"words":["Punct","KEYMAP","splitn","crossterm","YAZI","peekable","ratatui","syntect","pbpaste","pbcopy","oneshot","Posix","Lsar","XADDOS","zoxide","cands","Deque","precache","imageops","IFBLK","IFCHR","IFDIR","IFIFO","IFLNK","IFMT","IFSOCK","IRGRP","IROTH","IRUSR","ISGID","ISUID","ISVTX","IWGRP","IWOTH","IWUSR","IXGRP","IXOTH","IXUSR","libc","winsize","TIOCGWINSZ","xpixel","ypixel","ioerr","appender","Catppuccin","macchiato","gitmodules","Dotfiles","bashprofile","vimrc","flac","webp","exiftool","mediainfo","ripgrep","indexmap","indexmap","unwatch","canonicalize","serde","fsevent","Ueberzug","iterm","wezterm","sixel","chafa","ueberzugpp","Konsole","Überzug","pkgs","pdftoppm","poppler","prebuild","singlefile","jpegopt","EXIF","rustfmt","mktemp","nanos","xclip","xsel","natord","Mintty","nixos","nixpkgs","SIGTSTP","SIGCONT","SIGCONT","mlua","nonstatic","userdata","metatable","natsort","backstack","luajit","Succ","Succ","cand","fileencoding","foldmethod","lightgreen","darkgray","lightred","lightyellow","lightcyan","nushell","msvc","aarch","linemode","sxyazi","rsplit","ZELLIJ","bitflags","bitflags","USERPROFILE","Neovim","vergen","gitcl","Renderable","preloaders","prec","Upserting","prio","Ghostty","Catmull","Lanczos","cmds","unyank","scrolloff","headsup","unsub","uzers","scopeguard","SPDLOG","globset","filetime","magick","magick","prefetcher","Prework","prefetchers","PREWORKERS","conds","translit","rxvt","Urxvt","realpath","realname","REPARSE","hardlink","hardlinking","nlink","nlink","linemodes","SIGSTOP","sevenzip","rsplitn","replacen","DECSET","DECRQM","repeek","cwds","tcsi","Hyprland","Wayfire","SWAYSOCK","btime","nsec","codegen","gethostname","fchmod","fdfind","Rustc","rustc","ffprobe","vframes","luma","obase","outln","errln","tmtheme","twox","cfgs","fstype","objc","rdev","runloop","exfat","rclone","DECRQSS","DECSCUSR","libvterm"]}
4 changes: 0 additions & 4 deletions yazi-adapter/src/brand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pub enum Brand {
Ghostty,
Microsoft,
Rio,
Alacritty,
BlackBox,
VSCode,
Tabby,
Expand Down Expand Up @@ -52,7 +51,6 @@ impl Brand {
("WEZTERM_EXECUTABLE", B::WezTerm),
("GHOSTTY_RESOURCES_DIR", B::Ghostty),
("WT_Session", B::Microsoft),
("ALACRITTY_WINDOW_ID", B::Alacritty),
("VSCODE_INJECTION", B::VSCode),
("TABBY_CONFIG_DIRECTORY", B::Tabby),
];
Expand Down Expand Up @@ -81,7 +79,6 @@ impl Brand {
"foot-extra" => return Some(B::Foot),
"xterm-ghostty" => return Some(B::Ghostty),
"rio" => return Some(B::Rio),
"alacritty" => return Some(B::Alacritty),
"rxvt-unicode-256color" => return Some(B::Urxvt),
_ => warn!("[Adapter] Unknown TERM: {term}"),
}
Expand All @@ -102,7 +99,6 @@ impl Brand {
B::Ghostty => &[A::Kgp],
B::Microsoft => &[A::Sixel],
B::Rio => &[A::Iip, A::Sixel],
B::Alacritty => &[],
B::BlackBox => &[A::Sixel],
B::VSCode => &[A::Iip, A::Sixel],
B::Tabby => &[A::Iip, A::Sixel],
Expand Down
2 changes: 1 addition & 1 deletion yazi-boot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ serde = { workspace = true }

[build-dependencies]
clap = { workspace = true }
clap_complete = "4.5.44"
clap_complete = "4.5.45"
clap_complete_fig = "4.5.2"
clap_complete_nushell = "4.5.5"
vergen-gitcl = { version = "1.0.5", features = [ "build", "rustc" ] }
9 changes: 4 additions & 5 deletions yazi-boot/src/actions/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@ impl Actions {
writeln!(s, "\nYa")?;
writeln!(s, " Version: {}", Self::process_output("ya", "--version"))?;

let emulator = yazi_adapter::Emulator::detect().unwrap_or_default();
writeln!(s, "\nEmulator")?;
writeln!(s, " TERM : {:?}", env::var_os("TERM"))?;
writeln!(s, " TERM_PROGRAM : {:?}", env::var_os("TERM_PROGRAM"))?;
writeln!(s, " TERM_PROGRAM_VERSION: {:?}", env::var_os("TERM_PROGRAM_VERSION"))?;
writeln!(s, " Brand.from_env : {:?}", yazi_adapter::Brand::from_env())?;
writeln!(s, " Emulator.detect : {:?}", emulator)?;
writeln!(s, " Emulator.detect : {:?}", yazi_adapter::EMULATOR)?;

writeln!(s, "\nAdapter")?;
writeln!(s, " Adapter.matches: {:?}", yazi_adapter::Adapter::matches(emulator))?;
writeln!(s, " Adapter.matches: {:?}", yazi_adapter::ADAPTOR)?;

writeln!(s, "\nDesktop")?;
writeln!(s, " XDG_SESSION_TYPE : {:?}", env::var_os("XDG_SESSION_TYPE"))?;
Expand All @@ -41,7 +40,7 @@ impl Actions {
writeln!(s, " shared.in_ssh_connection: {:?}", yazi_shared::in_ssh_connection())?;

writeln!(s, "\nWSL")?;
writeln!(s, " WSL: {:?}", yazi_adapter::WSL.get())?;
writeln!(s, " WSL: {:?}", yazi_adapter::WSL)?;

writeln!(s, "\nVariables")?;
writeln!(s, " SHELL : {:?}", env::var_os("SHELL"))?;
Expand Down Expand Up @@ -70,7 +69,7 @@ impl Actions {
)?;

writeln!(s, "\nMultiplexers")?;
writeln!(s, " TMUX : {}", yazi_adapter::TMUX.get())?;
writeln!(s, " TMUX : {}", yazi_adapter::TMUX)?;
writeln!(s, " tmux version : {}", Self::process_output("tmux", "-V"))?;
writeln!(s, " tmux build flags : enable-sixel={}", Mux::tmux_sixel_flag())?;
writeln!(s, " ZELLIJ_SESSION_NAME: {:?}", env::var_os("ZELLIJ_SESSION_NAME"))?;
Expand Down
2 changes: 1 addition & 1 deletion yazi-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ yazi-shared = { path = "../yazi-shared", version = "25.2.11" }
# External build dependencies
anyhow = { workspace = true }
clap = { workspace = true }
clap_complete = "4.5.44"
clap_complete = "4.5.45"
clap_complete_fig = "4.5.2"
clap_complete_nushell = "4.5.5"
serde_json = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion yazi-core/src/tab/commands/arrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl Tab {
pub fn arrow(&mut self, opt: Opt) {
// TODO: remove this
if let Step::Fixed(n) = opt.step {
if n <= -999 || n >= 999 {
if n <= -999999 || n >= 999999 {
yazi_proxy::AppProxy::notify_warn(
"Deprecated command",
"`arrow -99999999` and `arrow 99999999` have been deprecated, please use `arrow top` and `arrow bot` instead.
Expand Down
2 changes: 1 addition & 1 deletion yazi-dds/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl Client {

if version.as_deref() != Some(BodyHi::version()) {
bail!(
"Incompatible version (Ya {}, Yazi {})",
"Incompatible version (Ya {}, Yazi {}), please restart all `ya` and `yazi` processes if you upgrade either one.",
BodyHi::version(),
version.as_deref().unwrap_or("Unknown")
);
Expand Down
1 change: 0 additions & 1 deletion yazi-plugin/preset/plugins/pdf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ function M:preload(job)
"-l", job.skip + 1,
"-singlefile",
"-jpeg", "-jpegopt", "quality=" .. PREVIEW.image_quality,
"-tiffcompression", "jpeg",
"-scale-to-x", PREVIEW.max_width, "-scale-to-y", "-1",
tostring(job.file.url),
tostring(cache),
Expand Down
4 changes: 1 addition & 3 deletions yazi-shared/src/sync_cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ impl<T: Copy> Clone for SyncCell<T> {
}

impl<T: Copy + Debug> Debug for SyncCell<T> {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
f.debug_struct("SyncCell").field("value", &self.get()).finish()
}
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { Debug::fmt(&self.get(), f) }
}

impl<T: Copy + Display> Display for SyncCell<T> {
Expand Down
Loading