sapling/eden/scm/lib/clidispatch/Cargo.toml
Meyer Jacobs b9f3c9c692 taggederror: Introduce taggederror-util for more ergonomic error tagging for eden error types.
Summary:
Introduce taggederror-util, which provides a new trait `AnyhowEdenExt`, which provides a method `eden_metadata` for anyhow errors and results. This method works much like `AnyhowExt::common_metadata`, but additionally supports extracting default error metadata from known `Tagged` types which are listed explicitly in the method implementation.

Extend `FilteredAnyhow` to support a configuration "metadata function", which allows swapping out `eden_metadata` for the standard `common_metadata`.

Modify Rust dispatch and Python bindings to use `AnyhowEdenExt` for metadata extraction and printing.

Modify `intentional_error` to rely on `AnyhowEdenExt` for tagging (removes `.tagged` call, no tags will be visible if `AnyhowEdenExt` is not used).

Reviewed By: DurhamG

Differential Revision: D22927203

fbshipit-source-id: 04b36fdfaa24af591118acb9e418d1ed7ae33f91
2020-08-06 19:37:25 -07:00

24 lines
602 B
TOML

[package]
name = "clidispatch"
version = "0.0.1"
authors = ["Facebook Source Control Team <sourcecontrol-dev@fb.com>"]
edition = "2018"
[dependencies]
anyhow = "1.0.20"
blackbox = { path = "../blackbox" }
cliparser = { path = "../cliparser" }
configparser = { path = "../configparser" }
indexedlog = { path = "../indexedlog" }
pipe = "0.2"
streampager = "0.8"
taggederror = { path = "../taggederror" }
taggederror-util = { path = "../taggederror-util" }
thiserror = "1.0.5"
thrift-types = { path = "../thrift-types" }
tracing = "0.1"
util = { path = "../util" }
[dev-dependencies]
tempfile = "3.0.7"