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

Suppress deprecation warnings #2026

Closed
2 of 3 tasks
netmute opened this issue Dec 11, 2024 · 6 comments · Fixed by #2027
Closed
2 of 3 tasks

Suppress deprecation warnings #2026

netmute opened this issue Dec 11, 2024 · 6 comments · Fixed by #2027
Labels
feature New feature request

Comments

@netmute
Copy link

netmute commented Dec 11, 2024

yazi --debug output

Yazi
    Version: 0.4.1 (Homebrew 2024-12-10)
    Debug  : false
    Triple : aarch64-apple-darwin (macos-aarch64)
    Rustc  : 1.83.0 (90b35a62 2024-11-26)

Ya
    Version: 0.4.1 (Homebrew 2024-12-10)

Emulator
    Brand.from_env      : Some(Kitty)
    Emulator.detect     : Emulator { kind: Left(Kitty), light: true, cell_size: Some((15, 27)) }
    Emulator.detect_full: Ok(Emulator { kind: Left(Kitty), light: true, cell_size: Some((15, 27)) })

Adapter
    Adapter.matches: Kgp

Desktop
    XDG_SESSION_TYPE           : None
    WAYLAND_DISPLAY            : None
    DISPLAY                    : None
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: None
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

NVIM
    NVIM          : false
    Neovim version: 0.10.2

Variables
    SHELL           : Some("/opt/homebrew/bin/fish")
    EDITOR          : Some("nvim")
    VISUAL          : None
    YAZI_FILE_ONE   : None
    YAZI_CONFIG_HOME: None
    YAZI_ZOXIDE_OPTS: None
    FZF_DEFAULT_OPTS: None

Text Opener
    default     : Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block-create: Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block-rename: Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })

Multiplexers
    TMUX               : 0
    tmux version       : No such file or directory (os error 2)
    tmux build flags   : enable-sixel=Unknown
    ZELLIJ_SESSION_NAME: None
    Zellij version     : No such file or directory (os error 2)

Dependencies
    file          : 5.41
    ueberzugpp    : No such file or directory (os error 2)
    ffmpeg/ffprobe: 7.1 / 7.1
    pdftoppm      : No such file or directory (os error 2)
    magick        : 7.1.1-41
    fzf           : 0.56.3
    fd/fdfind     : 10.2.0 / No such file or directory (os error 2)
    rg            : 14.1.1
    chafa         : No such file or directory (os error 2)
    zoxide        : 0.9.6
    7z/7zz        : 17.05 / No such file or directory (os error 2)
    jq            : 1.7.1

Clipboard
    wl-copy/paste: No such file or directory (os error 2) / No such file or directory (os error 2)
    xclip        : No such file or directory (os error 2)
    xsel         : No such file or directory (os error 2)

Please describe the problem you're trying to solve

After updating Yazi to the latest version, deprecation warnings from plugins using old functions are popping up everywhere. They clutter the interface and make it really hard to use Yazi. I know the plugin developers are already working on updates, but in the meantime, I can’t do much because the warnings won’t go away.

Would you be willing to contribute this feature?

  • Yes, I'll give it a shot

Describe the solution you'd like

It would be great to have an option to hide or suppress these deprecation warnings temporarily. Maybe a toggle in the settings or a config flag? That way, the interface stays clean, and I can keep using Yazi without the warnings taking over while waiting for plugins to get updated.

Additional context

No response

Checklist

  • I have searched the existing issues/discussions
  • The latest nightly build doesn't already have this feature
@netmute netmute added the feature New feature request label Dec 11, 2024
@sxyazi
Copy link
Owner

sxyazi commented Dec 11, 2024

These warnings (compatibility layer) will be completely removed in the next version 0.4.2, so adding a way to disable them might be unnecessary, as they will be gone anyway with the release of the next version.

However, we might still need to consider the timing of their removal. I mean, if a new critical bug is reported and we need to release a quick fix version 0.4.2, similar to how we did with 0.4.1, then the removal process might be delayed until 0.4.3. At that point, it might make more sense to reconsider whether adding an option to disable the warnings would be a good idea

@netmute
Copy link
Author

netmute commented Dec 11, 2024

If I understand correctly, you are going to remove the entire compatibility layer? That is going to break the plugins when they are not updated till then, which technically solves this issue, but not really 😬

The developer of dual-pane.yazi already said it will take them a while to make the plugin compatible with 0.4 (dawsers/dual-pane.yazi#5).

It would be nice to retain compatibility for a while, and still not have the deprecation warnings interrupt users.

@sxyazi
Copy link
Owner

sxyazi commented Dec 11, 2024

Yes, removing the compatibility layer is part of the 0.4.2 plan (as described in the migration docs), but it's not set in stone - I'm continuously assessing the right time to remove it to ensure it doesn't have too much impact on the plugin ecosystem.

Note that, unless any new critical bugs are reported, 0.4.2 is not expected to arrive too soon, and if 0.4.2 has to be a quick patch release, the removal will be delayed until 0.4.3.

@netmute
Copy link
Author

netmute commented Dec 11, 2024

Ok 👍

Please consider a toggle for deprecation warnings in the meantime. And thank you for making yazi 🥇

@sxyazi
Copy link
Owner

sxyazi commented Dec 11, 2024

Please try #2027

@mbaneshi
Copy link

I came here, after reading the discussion, and I want to thank you @sxyazi, open-source deserve ❤️ not 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants