mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
0205634fe1
Summary: Those two have historically used different (but largely copy pasted) code to produce their responses. Let's unify them by While in there, let's also modernize the formatting a little bit by letting anyhow do the formatting for us (we used to use `failure` when this code was written, and it didn't do it). There's a bit of ugliness here in the sense that out formatting is injecting the error into the state so it can be logger later. This is equivalent to what we had, but it's kinda clonwy. That said, I'm working on refactoring our error handling in this stack, so the plan is to clean this up (i.e. it won't stay very long). Finally, note that this diff removes the `ResponseCreationFailure` error kind in LFS. This is replaced by a `.context()` in `gotham_ext`. That said, we never really use this stuff: creations are fallible in Hyper but you only run into an error if you e.g. forget to add a status code, so we don't expect them to actually occur outside of development. Reviewed By: mitrandir77 Differential Revision: D27966421 fbshipit-source-id: 097f3b69f25fe39f8fbef925a272e88199896b39
62 lines
4.2 KiB
TOML
62 lines
4.2 KiB
TOML
[package]
|
|
name = "gotham_ext"
|
|
version = "0.1.0"
|
|
authors = ["Facebook"]
|
|
edition = "2018"
|
|
license = "GPLv2+"
|
|
|
|
[dependencies]
|
|
anyhow = "1.0"
|
|
async-compression = { version = "0.3", features = ["all"] }
|
|
async-trait = "0.1.45"
|
|
bytes = { version = "0.5", features = ["serde"] }
|
|
cached_config = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
|
|
cloned = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
|
|
futures = { version = "0.3.13", features = ["async-await", "compat"] }
|
|
gotham = { version = "=0.5.0", default-features = false }
|
|
gotham_derive = "=0.5.0"
|
|
hex = "0.4"
|
|
http = "0.2"
|
|
hyper = "0.13.10"
|
|
lazy_static = "1.0"
|
|
load_limiter = { version = "0.1.0", path = "../load_limiter" }
|
|
mime = "0.3.14"
|
|
openssl = "0.10"
|
|
percent-encoding = "2.1"
|
|
permission_checker = { version = "0.1.0", path = "../permission_checker" }
|
|
pin-project = "0.4"
|
|
quiet_stream = { version = "0.1.0", path = "../quiet_stream" }
|
|
scuba_ext = { version = "0.1.0", path = "../common/scuba_ext" }
|
|
slog = { version = "2.5", features = ["max_level_debug"] }
|
|
time_ext = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
|
|
tokio = { version = "0.2.25", features = ["full", "test-util"] }
|
|
tokio-openssl = "0.4"
|
|
trust-dns-resolver = "0.19"
|
|
|
|
[patch.crates-io]
|
|
addr2line = { git = "https://github.com/gimli-rs/addr2line.git", rev = "0b6b6018b5b252a18e628fba03885f7d21844b3c" }
|
|
async-compression = { git = "https://github.com/ahornby/async-compression", rev = "c7fe7f9512e742f0c0097a19de0fca89da140b31" }
|
|
bytecount = { git = "https://github.com/llogiq/bytecount", rev = "469eaf8395c99397cd64d059737a9054aa014088" }
|
|
chashmap = { git = "https://gitlab.redox-os.org/ahornby/chashmap", rev = "901ace2ca3cdbc2095adb1af111d211e254e2aae" }
|
|
const-random = { git = "https://github.com/fbsource/const-random", rev = "374c5b46427fe2ffbf6acbd9c1687e0f1a809f95" }
|
|
curl = { git = "https://github.com/kulshrax/curl-rust", rev = "2a15bbd8dbbd54734313fa703a64db7ce6ddaff0" }
|
|
curl-sys = { git = "https://github.com/kulshrax/curl-rust", rev = "2a15bbd8dbbd54734313fa703a64db7ce6ddaff0" }
|
|
enumset = { git = "https://github.com/danobi/enumset", rev = "4c01c583c27a725948fededbfb3461c572a669a4" }
|
|
gotham-02 = { package = "gotham", git = "https://github.com/krallin/gotham-02.git", rev = "1eb3b976c31e7e4334b188f3abfa5cc2e5cae033" }
|
|
gotham_derive-02 = { package = "gotham_derive", git = "https://github.com/krallin/gotham-02.git", rev = "1eb3b976c31e7e4334b188f3abfa5cc2e5cae033" }
|
|
hyper-02 = { package = "hyper", version = "0.13.10", git = "https://github.com/krallin/hyper-02.git", rev = "9c9453c5ae3e92de4ba30edd81bb45371b8fa8d6" }
|
|
lru-disk-cache = { git = "https://github.com/mozilla/sccache", rev = "033ebaae69beeb0ac04e8c35d6ff1103487bd9a3" }
|
|
openssl = { git = "https://github.com/sfackler/rust-openssl", rev = "68fc8ba890d77986b06ca5ce29d1089285fbbcf9" }
|
|
openssl-sys = { git = "https://github.com/sfackler/rust-openssl", rev = "68fc8ba890d77986b06ca5ce29d1089285fbbcf9" }
|
|
petgraph = { git = "https://github.com/jkeljo/petgraph", rev = "e3e9dd8632d23973fdc0b42c1117d5e5fc5fa384" }
|
|
prost = { git = "https://github.com/gabrielrussoc/prost", branch = "protoc-runtime" }
|
|
prost-build = { git = "https://github.com/gabrielrussoc/prost", branch = "protoc-runtime" }
|
|
prost-derive = { git = "https://github.com/gabrielrussoc/prost", branch = "protoc-runtime" }
|
|
prost-types = { git = "https://github.com/gabrielrussoc/prost", branch = "protoc-runtime" }
|
|
r2d2_sqlite = { git = "https://github.com/jsgf/r2d2-sqlite.git", rev = "6d77a828ca0a3c507a3f58561532a1b6c66c7918" }
|
|
rustfilt = { git = "https://github.com/jsgf/rustfilt.git", rev = "8141fa7f1caee562ee8daffb2ddeca3d1f0d36e5" }
|
|
tokio-02 = { package = "tokio", version = "0.2.25", git = "https://github.com/krallin/tokio.git", rev = "818f943db36e32b7c928351c32fe69ac913409f9" }
|
|
tokio-compat = { package = "tokio-compat", version = "0.1.6", git = "https://github.com/krallin/tokio-compat.git", rev = "c2330c2a0141353e467cc5861988daa2eae7cb54" }
|
|
tokio-core = { git = "https://github.com/bolinfest/tokio-core", rev = "5f37aa3c627d56ee49154bc851d6930f5ab4398f" }
|
|
toml = { git = "https://github.com/jsgf/toml-rs", branch = "dotted-table-0.5.7" }
|