hyprland-community / hyprland-rs

An unofficial rust wrapper for hyprland's IPC [maintainers=@yavko,@cyrinux]
Other
252 stars 56 forks source link

Error: SerdeError(Error("missing field `int`", line: 1, column: 71)) #184

Closed donovanglover closed 7 months ago

donovanglover commented 8 months ago

Getting this error in hyprdim 2.2.3 after updating Hyprland to 0.36.0.

Did a quick glance through the changelog however I didn't see anything obvious that would cause it to break.

P.S. Is it possible to make these errors work with RUST_BACKTRACE?

yavko commented 8 months ago

Getting this error in hyprdim 2.2.3 after updating Hyprland to 0.36.0.

Did a quick glance through the changelog however I didn't see anything obvious that would cause it to break.

P.S. Is it possible to make these errors work with RUST_BACKTRACE?

what hyprland-rs version does it use

yavko commented 8 months ago

also plz provide more debug info, the actual json would be cool, rust backtrace also good edit: nvm no backtrace its a result error, to get a backtrace for those, you'd need some better error system

yavko commented 8 months ago

also for the better error system I mentioned, I know there are better ones, but afaik anyhow has a simple backrtrace for errors with the backtrace feature

yavko commented 8 months ago

Looking at the hyprland-rs and hyprland source code, I can't find anything with an int field https://github.com/hyprwm/Hyprland/blob/main/src/debug/HyprCtl.cpp https://github.com/hyprland-community/hyprland-rs/blob/master/src/data/regular.rs

donovanglover commented 8 months ago

Tested with hyprland-rs 0.3.9 and 0.3.13. Will investigate more later.

One weird thing I noticed is that one of my shell scripts broke since hyprctl getoption general:gaps_in returns invalid type (internal error)

donovanglover commented 8 months ago

Related? https://github.com/hyprwm/Hyprland/issues/5025

yavko commented 8 months ago

It seems like the switch to hyprlang broke keywords, i see where the issue is now, probably getoption doesn't return a object anymore or something like that

donovanglover commented 8 months ago

Built hyprland with the latest commit on main to fix https://github.com/hyprwm/Hyprland/issues/4974 and hyprlang @ 0.5.0 and it looks like gaps_in and some other stuff use a custom field now

JarKz commented 7 months ago

Seems, there is the major changes in last Hyprland version with getoption command. I tested in my machine and it returns different results since pre-last Hyprland version. Give me some time and I'll make PR with fix.

JarKz commented 7 months ago

Fixed, y'all can use the git version.