4f7f38c1a0
Summary: Add a type to explicitly model a causal chain of errors, akin to error_chain. This looks a lot like Context, but is intended to show the entire stack of errors rather than deciding that only the top-level one is interesting. This adds a `ChainExt` trait, which adds a `.chain_ext(OuterError)` method to add another step to the causal chain. This is implemented for: - `F` where `F: Fail` - `Error` - `Result<_, F>` where `F: Fail` - `Result<_, Error>` - `Future`/`Stream<Error=F>` where `F: Fail` - `Future`/`Stream<Error=Error>` - `Chain` Using it is simple: ``` let res = something_faily().chain_err(LocalError::new("Something amiss"))?; ``` where `something_faily()` returns any of the above types. (This is done by adding an extra dummy marker type parameter to the `ChainExt` trait so that it can avoid problems with the coherence rules - thanks for the idea @[100000771202578:kulshrax]!) Reviewed By: lukaspiatkowski Differential Revision: D9394192 fbshipit-source-id: 0817844d283b3900d2555f526c2683231ca7fe12 |
||
---|---|---|
apiserver | ||
async-compression | ||
asyncmemo | ||
blobrepo | ||
blobrepo_utils | ||
blobstore | ||
bonsai-hg-mapping | ||
bonsai-utils | ||
bookmarks | ||
bundle2-resolver | ||
bytes-ext | ||
cache-warmup/src | ||
changesets | ||
cmdlib/src | ||
cmds | ||
common | ||
docs | ||
eden_server | ||
failure_ext | ||
filenodes | ||
futures-ext | ||
hgcli | ||
hgproto | ||
hook_tailer | ||
hooks | ||
hooks_old/src | ||
mercurial | ||
mercurial-bundles | ||
mercurial-types | ||
metaconfig | ||
mononoke-api/src | ||
mononoke-types | ||
netstring/src | ||
py_tar_utils | ||
reachabilityindex/src | ||
ready_state/src | ||
repo_client/src | ||
revset | ||
server | ||
sshrelay | ||
storage | ||
tests | ||
vfs | ||
.gitignore | ||
.travis.yml | ||
Cargo.toml | ||
CONTRIBUTING.md | ||
LICENSE | ||
packman.yml | ||
README.md | ||
rustfmt.toml |
Mononoke
Mononoke is a next-generation server for the Mercurial source control system, meant to scale up to accepting thousands of commits every hour across millions of files. It is primarily written in the Rust programming language.
Caveat Emptor
Mononoke is still in early stages of development. We are making it available now because we plan to start making references to it from our other open source projects such as Eden.
The version that we provide on GitHub does not build yet.
This is because the code is exported verbatim from an internal repository at Facebook, and not all of the scaffolding from our internal repository can be easily extracted. The key areas where we need to shore things up are:
- Full support for a standard
cargo build
. - Open source replacements for Facebook-internal services (blob store, logging etc).
The current goal is to get Mononoke working on Linux. Other Unix-like OSes may be supported in the future.