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

Panics, fails to get to get Hyprland version #110

Open
murlakatamenka opened this issue Nov 1, 2024 · 0 comments
Open

Panics, fails to get to get Hyprland version #110

murlakatamenka opened this issue Nov 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@murlakatamenka
Copy link

Bug Report

Current hyprdim v3.0.0 panics because it fails to get Hyprland version:

$ git checkout 3.0.0

$ RUST_BACKTRACE=1 RUST_LOG=1 cargo run

Error: cannot parse integer from empty string

Stack backtrace:
   0: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
             at /home/me/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anyhow-1.0.89/src/backtrace.rs:27:14
   1: <core::result::Result<T,F> as core::ops::try_trait::FromResidual<core::result::Result<core::convert::Infallible,E>>>::from_residual
             at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/result.rs:1987:27
   2: hyprdim::ui::hyprland_version::hyprland_version
             at ./src/ui/hyprland_version.rs:8:16
   3: hyprdim::main
             at ./src/main.rs:25:9

I've updated hyprland-rs to 0.4.0-beta.1 but it needs more code changes (there are changes to event stream). So, for now the quick and dirty workaround to make it work is to disable Hyprland version check:

hyprdim/src/main.rs

Lines 25 to 30 in 3a51a13

if !hyprland_version(MINIMUM_VERSION)? {
println!(
"WARNING: This hyprdim version only supports Hyprland v{} and above.",
MINIMUM_VERSION
);
}


I'm maintainer of the AUR package, so I'll just set minimum supported Hyprland version in the PKGBUILD and disable version check in prepare() for now.

Environment

$ hyprdim -V

hyprdim 3.0.0
$ hyprctl version

hyprctl version
Hyprland, built from branch  at commit 4520b30d498daca8079365bdb909a8dea38e8d55  (version: bump to 0.44.1).
Date: Wed Oct 9 12:54:39 2024
Tag: v0.44.1, commits: 5309
built against aquamarine 0.4.3


flags: (if any)

Priorities

Add a 👍 reaction to issues you find important.

@murlakatamenka murlakatamenka added the bug Something isn't working label Nov 1, 2024
@murlakatamenka murlakatamenka changed the title Pacnics, fails to get to get Hyprland version Panics, fails to get to get Hyprland version Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant