mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
A Scalable, User-Friendly Source Control System.
b1e12ca408
Summary: This replaces the `ensureDataLoaded()`, `materializeForWrite()`, and `materializeAndTruncate()` methods in `FileInode` with new safer alternatives: `runWhileDataLoaded()`, `runWhileMaterialized()`, and `truncateAndRun()` These new methods take a function to run, and run it while holding the state lock with the FileInode guaranteed to be in the desired state. They also require the caller move in the state lock as an argument, to help ensure that the caller gets the locking behavior correct. The old methods required that the caller not already hold the state lock while calling them. This pre-condition was violated in `FileInode::write()` and possibly other places. They also required releasing the lock between they confirmed the file state and when the caller's function ran, requiring additional lock and unlock operations, and also making the code harder to reason about since other threads could change the state during the time when the lock was released. Reviewed By: chadaustin Differential Revision: D7363180 fbshipit-source-id: d8e667d0bc7006c519252a8d0682af97517997eb |
||
---|---|---|
common | ||
eden | ||
external | ||
.gitignore | ||
CONTRIBUTING.md | ||
getdeps.py | ||
LICENSE | ||
PATENTS | ||
README.md |
Eden
Eden is a project with several components, the most prominent of which is a virtual filesystem built using FUSE.
Caveat Emptor
Eden 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 Buck, Watchman, and Nuclide.
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:
- The reinterpretations of build macros in
DEFS
. - A process for including third-party dependencies (presumably via Git submodules) and wiring up the
external_deps
argument in the build macros to point to them. - Providing the toolchain needed to power the [undocumented]
thrift_library()
rule in Buck.
The goal is to get Eden building on both Linux and OS X, though Linux support is expected to come first.