Skip to content

ref(ffi,cabi): Replace outdated failure with anyhow crate#1669

Merged
olksdr merged 1 commit intomasterfrom
chore/ffi-and-cabi-with-anyhow
Dec 5, 2022
Merged

ref(ffi,cabi): Replace outdated failure with anyhow crate#1669
olksdr merged 1 commit intomasterfrom
chore/ffi-and-cabi-with-anyhow

Conversation

@olksdr
Copy link
Copy Markdown
Contributor

@olksdr olksdr commented Dec 4, 2022

Failure crate is outdated and not supported anymore. It's time to switch to modern alternative.
Instead of failure::Error switching to anyhow::Error which is a wrapper around a dynamic error type.

Error works a lot like Box<dyn std::error::Error>, but with these differences:

  • Requires that the error is Send, Sync, and 'static.
  • Guarantees that a backtrace is available, even if the underlying error type does not provide one.
  • Is represented as a narrow pointer — exactly one word in size instead of two.

#skip-changelog

Failure crate is outdated and not supported anymore. It's time to switch
to modern alternative.
Instead of `failure::Error` switching to `anyhow::Error` which is a wrapper around a dynamic error type.

`Error` works a lot like `Box<dyn std::error::Error>`, but with these differences:

* Requires that the error is Send, Sync, and 'static.
* Guarantees that a backtrace is available, even if the underlying error type does not provide one.
* Is represented as a narrow pointer — exactly one word in size instead of two.
@olksdr olksdr requested a review from a team December 4, 2022 13:22
@olksdr olksdr self-assigned this Dec 4, 2022
@olksdr olksdr merged commit d18d06b into master Dec 5, 2022
@olksdr olksdr deleted the chore/ffi-and-cabi-with-anyhow branch December 5, 2022 08:26
jan-auer added a commit that referenced this pull request Dec 5, 2022
* master:
  ref(server): Remove internal dynamic sampling metrics (#1671)
  fix(build): Pin ubuntu image to 20.04 (#1672)
  ref(ffi,cabi): Replace outdated failure with anyhow crate (#1669)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants