hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
18.58k stars 772 forks source link

Errors in sourced files cause repeated errors to display in notification #5166

Open zakk4223 opened 4 months ago

zakk4223 commented 4 months ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch main at commit 19c90048d65a5660384d2fb865926a366696d6be dirty (props: bump ver to 0.37.0). Date: Fri Mar 15 19:58:39 2024 Tag: v0.37.0 flags: (if any) System Information: System name: Linux Node name: blkheart Release: 6.8.1-zen1-1-zen Version: #1 ZEN SMP PREEMPT_DYNAMIC Sat, 16 Mar 2024 17:15:23 +0000 GPU information: 0d:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] [1002:73bf] (rev c0) (prog-if 00 [VGA controller]) os-release: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo plugins: River Layout by Zakk ver 1.0 Monitor WS rules by Zakk ver 1.0 XWayland Primary Display by Zakk ver 1.0 Workspace layouts by Zakk ver 1.0 split-monitor-workspaces by Duckonaut ver 1.1.0 N_Stack layout by Zakk ver 1.0 ```

Bug or Regression?

Bug

Description

If a sourced file has an error in it, the error notification will report the error occurring twice: once in sourced file at the correct line number and again in hyprland.conf at the line where the file was sourced.

The reported error at the point where the file is sourced also seems to contain all previous errors, even ones that occurred in just hyprland.conf

How to reproduce

Have a hyprland.conf with an error somewhere in it. Somewhere after the error, source a file like ~/.config/hypr/config.d/blah.conf, make sure blah.conf also has an error.

You will get repeated errors in the error notification. It looks like it is showing the first error at the correct line number, then the sourced file's error at the correct line number, and then combining both those errors and reporting them as occurring on the line blah.conf was sourced. (but also preserving the original line numbers too).

Crash reports, logs, images, videos

No response

mitchejj commented 4 months ago

Did you recently upgrade your instance of Hyprland? If so you may want to edit your hyprland.conf to the new syntax . For instance if your config is based off the old auto generated you most likely have a config that starts with:

########################################################################################
AUTOGENERATED HYPR CONFIG.
PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT,
OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
########################################################################################

Will throw 5 errors...