Organized the code and enhanced error handling #10

Open
let_rec wants to merge 21 commits from feat/general-report_lib into main
Owner

Summary

The code is more organized now and better error handling

Motivation

The code had many noisy aspects and clumsily written. So that, we needed to fix that

What have I done

We have been using create_report function to create report. Due to our views, it's unnecessary fp idiom which has become complex code to read and maintain. So, I built ReportBuilder which switches our previous create_report function to more organized and close to Rust idiom code.

Besides, I prevented many potentially error panics and converted to organized error handling :)

# Summary The code is more organized now and better error handling ## Motivation The code had many noisy aspects and clumsily written. So that, we needed to fix that ## What have I done We have been using `create_report` function to create report. Due to our views, it's unnecessary fp idiom which has become complex code to read and maintain. So, I built `ReportBuilder` which switches our previous `create_report` function to more organized and close to Rust idiom code. Besides, I prevented many potentially error panics and converted to organized error handling :)
chore: add required argument for cli command exec
Some checks are pending
Test CI / test-flake (push) Waiting to run
Test CI / test-project (push) Waiting to run
a53a5b5ce6
fix: remove all unwraps and unnecessary Arc in window/report.rs
Some checks failed
Test CI / test-project (push) Has been cancelled
Test CI / test-flake (push) Has been cancelled
Test CI / test-project (pull_request) Has been cancelled
Test CI / test-flake (pull_request) Has been cancelled
02743058f4
merge with main
Some checks failed
Test CI / test-project (push) Has been cancelled
Test CI / test-flake (push) Has been cancelled
Test CI / test-project (pull_request) Has been cancelled
Test CI / test-flake (pull_request) Has been cancelled
868cdaf401
refactor: removed all .unwrap() except one in the crash-event
Some checks failed
Test CI / test-flake (push) Successful in 15s
Test CI / test-project (push) Failing after 3m32s
Test CI / test-flake (pull_request) Successful in 11s
Test CI / test-project (pull_request) Failing after 9s
a7cc788ebb
feat: update report lib and refactor related codes
Some checks failed
Test CI / test-flake (push) Successful in 12s
Test CI / test-project (push) Failing after 1m19s
e1cca8efde
merge with main
Some checks failed
Test CI / test-flake (push) Successful in 14s
Test CI / test-project (push) Failing after 11s
Test CI / test-flake (pull_request) Successful in 13s
Test CI / test-project (pull_request) Failing after 8s
008e6ffbeb
@ -302,3 +302,2 @@
.register(async move {
let conn = Connection::system().await.unwrap();
let proxy = crate::DaemonServiceProxy::new(&conn).await.unwrap();
let conn = match Connection::system().await {
Owner

Here fixed already

bcb6b1de5b/crates/gui/src/window/mod.rs

You can show in my PR: #6/files

Here fixed already https://git.oss.uzinfocom.uz/xinux/relago/src/commit/bcb6b1de5b273a1dc3078c72bd873cfc430adf2a/crates/gui/src/window/mod.rs You can show in my PR: https://git.oss.uzinfocom.uz/xinux/relago/pulls/6/files
Author
Owner

I will merge these PRs and keep the best solutions while fixing conflicts

I will merge these PRs and keep the best solutions while fixing conflicts
let_rec marked this conversation as resolved
chore: setup clippy
Some checks failed
Test CI / test-project (push) Failing after 1m19s
Test CI / test-project (pull_request) Failing after 9s
Test CI / test-flake (pull_request) Successful in 10s
Test CI / test-flake (push) Successful in 14s
ba239d5f31
some clippy suggestions implemented
Some checks failed
Test CI / test-project (push) Failing after 7m37s
Test CI / test-flake (push) Successful in 1m24s
Test CI / test-flake (pull_request) Successful in 11s
Test CI / test-project (pull_request) Failing after 10s
384e06707b
wip: remove unwraps window module
Some checks failed
Test CI / test-flake (push) Successful in 14s
Test CI / test-project (push) Failing after 1m19s
Test CI / test-flake (pull_request) Successful in 11s
Test CI / test-project (pull_request) Failing after 9s
1b7512b8bb
fix warn clippy for Default instace need
Some checks failed
Test CI / test-flake (push) Successful in 13s
Test CI / test-project (push) Failing after 1m19s
Test CI / test-flake (pull_request) Successful in 11s
Test CI / test-project (pull_request) Failing after 10s
bcb6b1de5b
chore: pull latest updates from main
Some checks failed
Test CI / test-flake (push) Successful in 14s
Test CI / test-project (push) Failing after 1m19s
Test CI / test-flake (pull_request) Successful in 11s
Test CI / test-project (pull_request) Failing after 8s
19792449ab
Merge branch 'feat/general-report_lib' of ssh://git.oss.uzinfocom.uz:2223/xinux/relago into feat/general-report_lib
Some checks failed
Test CI / test-flake (push) Successful in 15s
Test CI / test-project (push) Failing after 4m55s
Test CI / test-flake (pull_request) Successful in 10s
Test CI / test-project (pull_request) Failing after 10s
d26571f56d
Some checks failed
Test CI / test-flake (push) Successful in 15s
Test CI / test-project (push) Failing after 4m55s
Test CI / test-flake (pull_request) Successful in 10s
Test CI / test-project (pull_request) Failing after 10s
This pull request has changes conflicting with the target branch.
  • crates/cli/src/lib.rs
  • crates/gui/src/window/mod.rs
  • crates/report/src/info.rs
  • crates/report/src/lib.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/general-report_lib:feat/general-report_lib
git switch feat/general-report_lib

Merge

Merge the changes and update on Forgejo.
git switch main
git merge --no-ff feat/general-report_lib
git switch feat/general-report_lib
git rebase main
git switch main
git merge --ff-only feat/general-report_lib
git switch feat/general-report_lib
git rebase main
git switch main
git merge --no-ff feat/general-report_lib
git switch main
git merge --squash feat/general-report_lib
git switch main
git merge --ff-only feat/general-report_lib
git switch main
git merge feat/general-report_lib
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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
xinux/relago!10
No description provided.