[PR #1262] [MERGED] refactor(clients): use concrete errors where possible #4075

Closed
opened 2026-05-22 23:57:38 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JakeStanger/ironbar/pull/1262
Author: @JakeStanger
Created: 11/26/2025
Status: Merged
Merged: 11/27/2025
Merged by: @JakeStanger

Base: masterHead: refactor/thiserror


📝 Commits (2)

  • 7ae773a revert: fix(logging): panic messages have escaped ansi sequences
  • 2abb847 refactor(clients): use concrete errors where possible

📊 Changes

21 files changed (+209 additions, -147 deletions)

View changed files

.idea/scopes/clients.xml (+3 -0)
📝 Cargo.lock (+57 -22)
📝 Cargo.toml (+2 -1)
📝 src/clients/bluetooth.rs (+3 -4)
📝 src/clients/compositor/hyprland.rs (+2 -2)
📝 src/clients/compositor/mod.rs (+29 -25)
📝 src/clients/compositor/niri/connection.rs (+6 -4)
📝 src/clients/compositor/niri/mod.rs (+2 -3)
📝 src/clients/compositor/sway.rs (+5 -2)
📝 src/clients/libinput.rs (+24 -6)
📝 src/clients/music/mod.rs (+2 -1)
📝 src/clients/music/mpd.rs (+3 -5)
📝 src/clients/music/mpris.rs (+1 -2)
📝 src/clients/networkmanager.rs (+1 -2)
📝 src/clients/sway.rs (+4 -4)
📝 src/clients/swaync/mod.rs (+2 -2)
📝 src/clients/sysinfo.rs (+12 -4)
📝 src/clients/wayland/mod.rs (+40 -26)
📝 src/clients/wayland/wlr_data_control/mod.rs (+5 -3)
📝 src/clients/wayland/wlr_data_control/source.rs (+1 -2)

...and 1 more files

📄 Description

This is the first of many steps to improve the codebase and decouple the client code from the rest of the codebase. The hope is that eventually the repo can be split into a workspace with multiple packages to try and keep code sanitary and maybe even improve compilation times.

Also includes a downgrade of tracing-subscriber, which fixes the ANSI characters showing in errors, and reverts attempted fixes put in place for the upgrade


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JakeStanger/ironbar/pull/1262 **Author:** [@JakeStanger](https://github.com/JakeStanger) **Created:** 11/26/2025 **Status:** ✅ Merged **Merged:** 11/27/2025 **Merged by:** [@JakeStanger](https://github.com/JakeStanger) **Base:** `master` ← **Head:** `refactor/thiserror` --- ### 📝 Commits (2) - [`7ae773a`](https://github.com/JakeStanger/ironbar/commit/7ae773abd7f406b01b5e785df935b31b92714bba) revert: fix(logging): panic messages have escaped ansi sequences - [`2abb847`](https://github.com/JakeStanger/ironbar/commit/2abb847a9723b9c3dfa3d0519efd1ca787a3940a) refactor(clients): use concrete errors where possible ### 📊 Changes **21 files changed** (+209 additions, -147 deletions) <details> <summary>View changed files</summary> ➕ `.idea/scopes/clients.xml` (+3 -0) 📝 `Cargo.lock` (+57 -22) 📝 `Cargo.toml` (+2 -1) 📝 `src/clients/bluetooth.rs` (+3 -4) 📝 `src/clients/compositor/hyprland.rs` (+2 -2) 📝 `src/clients/compositor/mod.rs` (+29 -25) 📝 `src/clients/compositor/niri/connection.rs` (+6 -4) 📝 `src/clients/compositor/niri/mod.rs` (+2 -3) 📝 `src/clients/compositor/sway.rs` (+5 -2) 📝 `src/clients/libinput.rs` (+24 -6) 📝 `src/clients/music/mod.rs` (+2 -1) 📝 `src/clients/music/mpd.rs` (+3 -5) 📝 `src/clients/music/mpris.rs` (+1 -2) 📝 `src/clients/networkmanager.rs` (+1 -2) 📝 `src/clients/sway.rs` (+4 -4) 📝 `src/clients/swaync/mod.rs` (+2 -2) 📝 `src/clients/sysinfo.rs` (+12 -4) 📝 `src/clients/wayland/mod.rs` (+40 -26) 📝 `src/clients/wayland/wlr_data_control/mod.rs` (+5 -3) 📝 `src/clients/wayland/wlr_data_control/source.rs` (+1 -2) _...and 1 more files_ </details> ### 📄 Description This is the first of many steps to improve the codebase and decouple the client code from the rest of the codebase. The hope is that eventually the repo can be split into a workspace with multiple packages to try and keep code sanitary and maybe even improve compilation times. Also includes a downgrade of `tracing-subscriber`, which fixes the ANSI characters showing in errors, and reverts attempted fixes put in place for the upgrade --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
JakeStanger 2026-05-22 23:57:38 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#4075
No description provided.