-
-
Notifications
You must be signed in to change notification settings - Fork 654
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
Tracking issue to improve error handling #1753
Comments
I want to work on this, any hints or suggestions where I can start. |
Hi @naosense, glad to hear it! Here's a bunch of suggestions (along with the number of calls to
You can pick whichever suits you most. You can also look for other files/modules to work on. Personally I checkout the latest $ rg -c "\.unwrap\(" -g '*.rs' -g '!*tests*' to get an overview of how many calls to |
ok, I'll try it |
I'd like to call out an example of how error handling could be improved that is easily reproduced. I recently messed with my filesystem with specific goals in mind and a side effect that I missed was my user's .cache directory getting owned by root. Everything I previously used could still function since those .cache artifacts already existed and were still owned by me. zellij was the first new thing I tried since this mistake. When starting zellij for the first time it crashed with a pretty verbose file not found and permission denied error but no specifics as to the file. I then tried the recommended RUST env var to get more info, but the backtrace was unusable as it was all The only reason I found /tmp/zellij-1000/zellig-log was because I also tried strace against zellij. That log is the only place I got usable info to solve my problem as it specifically stated |
The goal
We are looking to improve the general state of error handling in zellij. As the zellij code-base changed, a lot of the previous places where
unwrap
made sense can now potentially cause errors which we'd like to handle. We want to eliminate calls tounwrap
and useResult
types instead, so we can handle errors where appropriate.You can read more about the background and the tools we have to achieve this in the docs.
Help wanted
The zellij codebase has become very large, and few functions use
Result
types to propagate errors up to calling functions. We are looking for contributors to help us out with successively converting the code to change this.If you want to make a contribution, this may be the ideal start for you. While working on error handling you:
Contributing
You want to help us out with error handling? That's great!
You can get going right away. Keep in mind while working on this that it's very important to understand the piece of code you are changing. A good way to help you understand what is happening would be to try to run the application, reach that place in the code and see what happens. You can also try to manually generate errors in different places (for example with the
anyhow::bail!
macro) to see if you're on the right track.In order to help us coordinate efforts, we would ask you to indicate that you're working on some aspect of error handling by either:
This allows us to keep the list below up-to-date, and prevents you from working on something that another person has picked up before you.
If you want to help us, but aren't sure where to start or what to do, you can either:
We'll help you find a suitable topic to work on and guide you as questions arise.
Thanks in advance!
List of efforts regarding error handling
panic
s intab
module #1748wasm_vm
#1827server::ui::boundaries
#1871server::pty_writer
#1872server::terminal_bytes
#1876zellij_server::output
#1878log::error
in server #1881server::os_input_output
#1895The text was updated successfully, but these errors were encountered: