Replace InputRule with Path.

Summary:
Updated `ConcurrentMapFileHashCache` to use a `LoadingCache` to maintain the
mapping from `Path` to `HashCode`.

Previously, `InputRule` contained four fields (`File`, `BuildTarget`, `ListenableFuture`, `RuleKey`).
We had one of these for potentially every file in a project. That is a large potential for
wasted memory. The existence of `InputRule` also required us to persist some kludginess in
`BuildTarget`.

This diff removes the hacks from `BuildTarget` and reclaims potentially a ton of memory.
By using a `LoadingCache`, we do not have to worry about the same input file being sha1'd
multiple times. We can also stop passing around references to a pathResolver in many places
and rely on `Path` being a path relative to the project root.

Test Plan: Sandcastle builds.
33 files changed
tree: 0b014ba9f98992d9579aabdb490963e57efb1ba5
  1. .idea/
  2. bin/
  3. config/
  4. docs/
  5. lib/
  6. plugin/
  7. pmd/
  8. scripts/
  9. src/
  10. test/
  11. testdata/
  12. third-party/
  13. .buckconfig
  14. .classpath
  15. .gitignore
  16. .project
  17. buck.iml
  18. build.xml
  19. DEFS
  20. LICENSE
  21. README.md
README.md

Buck

Buck is an Android build tool. To see what Buck can do for you, check out the documentation at http://facebook.github.io/buck/.

Installation

To build Buck, run the following:

git clone git@github.com:facebook/buck.git
cd buck
ant
./bin/buck --help

License

Apache License 2.0