zellij-org/zellij

Tracking issue to improve error handling

Open

#1,753 opened on Sep 27, 2022

View on GitHub
 (4 comments) (3 reactions) (0 assignees)Rust (32,593 stars) (1,191 forks)batch import
enhancementgood first issuehacktoberfesthelp wanted

Description

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 to unwrap and use Result 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:

  • get familiar with different parts of the code, without having to integrate new features while you're at it,
  • get a feeling for how individual portions of the code interact and
  • help users and developers alike by
    • making more sense of application crashes, or
    • preventing crashes from occurring in the first place

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:

  • leaving us a comment here in this issue, or
  • opening a Pull Request ahead of time and mentioning this issue from there.

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:

  • leave a comment in this issue, or
  • reach out to us via Discord or Matrix.

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

  • #1748
  • #1770
  • #1775
  • #1808
  • #1827
  • #1838
  • #1840
  • #1870
  • #1871
  • #1872
  • #1876
  • #1878
  • #1881
  • #1895
  • #2068
  • #2069
  • #2093

Contributor guide