Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
node, term: Remove dependency on `anyhow`
Merged lorenz opened 8 months ago

radicle-node

It has always bugged me that we resort to anyhow for just a handful of errors, really. It also turns out that we were holding lexopt wrong, it features parse_with which neatly integrates with FromStr, and luckily all our arguments implement that trait. This makes for cleaner option parsing.

For now, the execution errors are all “transparent”, which shouldn’t be much of a regression, if at all.

radicle-term

As a library crate, it is bad to return such generic errors.

To get there, errors from inquire are downcasted.

This allowed to clean up the public interface of radicle-term, so that it does also not leak the inquire::InquireError in its public API.

Notes

In both cases we touched parsing: For radicle-node it was about CLI options, for radicle-term it was user input prompts.

lorenz opened with revision 2b4f2afc on base ded0d19d +76 -59 8 months ago

radicle-node

It has always bugged me that we resort to anyhow for just a handful of errors, really. It also turns out that we were holding lexopt wrong, it features parse_with which neatly integrates with FromStr, and luckily all our arguments implement that trait. This makes for cleaner option parsing.

For now, the execution errors are all “transparent”, which shouldn’t be much of a regression, if at all.

radicle-term

As a library crate, it is bad to return such generic errors.

To get there, errors from inquire are downcasted.

This allowed to clean up the public interface of radicle-term, so that it does also not leak the inquire::InquireError in its public API.

Notes

In both cases we touched parsing: For radicle-node it was about CLI options, for radicle-term it was user input prompts.

lorenz pushed revision 2 6701fe88 on base ded0d19d +232 -145 8 months ago

Also tackle radicle-term.

lorenz pushed revision 3 713eb238 on base 55cdd880 +232 -145 8 months ago

Rebase

fintohaps pushed revision 4 c9c8811a on base 4bf3ab6f +231 -145 7 months ago

Changes:

  • Rebase
  • Use ok_or_else
  • Reword commits
  • Use non_exhaustive
fintohaps merged revision c9c8811a at 2127782b 7 months ago