2018-10-13 00:48:03 +03:00
|
|
|
[package]
|
2019-08-09 08:45:25 +03:00
|
|
|
name = "hgcommands"
|
2018-10-13 00:48:03 +03:00
|
|
|
version = "0.1.0"
|
2019-06-03 17:19:38 +03:00
|
|
|
edition = "2018"
|
2018-10-13 00:48:03 +03:00
|
|
|
|
2019-10-29 01:42:14 +03:00
|
|
|
[features]
|
2020-01-29 07:15:35 +03:00
|
|
|
default = ["python2"]
|
2020-08-27 02:29:14 +03:00
|
|
|
fb = ["configparser/fb", "version/generated"]
|
2020-01-29 00:37:50 +03:00
|
|
|
python2 = ["bindings/python2", "pytracing/python2", "python27-sys", "cpython-ext/python2", "cpython/python27-sys"]
|
|
|
|
python3 = ["bindings/python3", "pytracing/python3", "python3-sys", "cpython-ext/python3", "cpython/python3-sys"]
|
2019-10-29 01:42:14 +03:00
|
|
|
|
2018-10-13 00:48:03 +03:00
|
|
|
[dependencies]
|
2019-11-22 19:51:58 +03:00
|
|
|
anyhow = "1.0.20"
|
2020-12-10 23:32:23 +03:00
|
|
|
async-runtime = { path = "../async-runtime" }
|
2020-01-29 00:37:50 +03:00
|
|
|
bindings = { path = "../../edenscmnative/bindings", default-features = false }
|
2019-09-21 03:43:59 +03:00
|
|
|
blackbox = { path = "../blackbox" }
|
2019-07-27 06:34:57 +03:00
|
|
|
clidispatch = { path = "../clidispatch" }
|
2019-08-09 08:45:25 +03:00
|
|
|
cliparser = { path = "../cliparser", features = ["python"] }
|
2020-01-29 00:37:50 +03:00
|
|
|
cpython-ext = { path = "../cpython-ext", default-features = false }
|
2020-04-28 21:45:04 +03:00
|
|
|
cpython = { version = "0.5", default-features = false }
|
2020-08-17 02:53:34 +03:00
|
|
|
configparser = { path = "../configparser" }
|
2020-12-01 20:57:24 +03:00
|
|
|
dag = { path = "../dag" }
|
2020-07-09 23:06:18 +03:00
|
|
|
edenapi = { path = "../edenapi" }
|
2021-02-19 21:39:21 +03:00
|
|
|
edenapi_types = { path = "../edenapi/types" }
|
2020-01-14 01:19:28 +03:00
|
|
|
edenfs-client = { path = "../edenfs-client"}
|
2020-01-29 00:37:50 +03:00
|
|
|
encoding = { path = "../encoding" }
|
2019-11-05 02:49:48 +03:00
|
|
|
flate2 = "1"
|
2020-08-28 04:24:10 +03:00
|
|
|
fsyncglob = { path = "../fsyncglob" }
|
2021-02-08 21:35:23 +03:00
|
|
|
futures = { version = "0.3.5", features = ["async-await", "compat"] }
|
2019-11-08 01:19:52 +03:00
|
|
|
hgtime = { path = "../hgtime"}
|
|
|
|
indexedlog = { path = "../indexedlog" }
|
2021-01-20 18:21:56 +03:00
|
|
|
indicatif = "0.15"
|
2019-10-24 23:38:34 +03:00
|
|
|
libc = "0.2"
|
2019-11-05 02:49:48 +03:00
|
|
|
mincode = { path = "../mincode"}
|
2019-11-05 02:49:48 +03:00
|
|
|
parking_lot = "0.9"
|
2019-09-21 03:43:59 +03:00
|
|
|
procinfo = { path = "../procinfo"}
|
2020-04-28 21:45:04 +03:00
|
|
|
python27-sys = { version = "0.5", optional = true }
|
|
|
|
python3-sys = { version = "0.5", optional = true }
|
2020-01-29 00:37:50 +03:00
|
|
|
pytracing = { path = "../../edenscmnative/bindings/modules/pytracing", default-features = false }
|
2019-08-16 05:35:17 +03:00
|
|
|
revisionstore = { path = "../revisionstore"}
|
debug: introduce error classification and metadata propagation
Summary:
Introduce new rust library, taggederror, which contains utilities for attaching metadata to errors. The library provides two main methods for attaching metadata to an error, the TaggedError wrapper type, and the AnyhowExt trait methods. Provides a struct, CommonMetadata, which contains all the metadata types introduced by taggederror (fault, transience, category, and typename), which can also be attached individually (and the same pattern can be used to attach other metadata).
Introduce a new native rust command, debugthrowrustexception, which causes the command to return an error, with some attached metadata.
Modify hg rust native command dispatch error handling to use debug formatter to print anyhow::Error errors. This will print out the source chain, contexts, and backtrace if available, which will cause the metadata we attach as a wrapper error or context to be printed.
Reviewed By: DurhamG
Differential Revision: D22420941
fbshipit-source-id: d38c5a10b686d86b69a2c0a19f5bcbf4ca24dff6
2020-07-15 20:01:07 +03:00
|
|
|
taggederror = { path = "../taggederror"}
|
|
|
|
thiserror = "1.0.5"
|
2019-11-05 02:49:48 +03:00
|
|
|
tracing = "0.1"
|
|
|
|
tracing-collector = { path = "../tracing-collector" }
|
2021-01-21 22:33:17 +03:00
|
|
|
tracing-subscriber = "0.2"
|
2019-08-21 02:38:50 +03:00
|
|
|
types = { path = "../types" }
|
|
|
|
util = { path = "../util" }
|
2020-05-19 04:49:01 +03:00
|
|
|
version = { path = "../version" }
|
third-party/rust: import async-compression + update zstd
Summary:
This imports the async-compression crate. We have an equivalent-ish in
common/rust, but it targets Tokio 0.1, whereas this community-supported crate
targets Tokio 0.2 (it offers a richer API, notably in the sense that we
can use it for Streams, whereas the async-compression crate we have is only for
AsyncWrite).
In the immediate term, I'd like to use this for transfer compression in
Mononoke's LFS Server. In the future, we might also use it in Mononoke where we
currently use our own async compression crate when all that stuff moves to
Tokio 0.2.
Finally, this also updates zstd: the version we link to from tp2 is actually
zstd 1.4.5, so it's a good idea to just get the same version of the zstd crate.
The zstd crate doesn't keep a great changelog, so it's hard to tell what has changed.
At a glance, it looks like the answer is not much, but I'm going to look to Sandcastle
to root out potential issues here.
Reviewed By: StanislavGlebik
Differential Revision: D23652335
fbshipit-source-id: e250cef7a52d640bbbcccd72448fd2d4f548a48a
2020-09-15 17:57:18 +03:00
|
|
|
zstd = "0.5"
|