`buck query` for paths and deps backed by neo4j. Summary: Added a `buck query` command to query for all the dependencies of a target, or for all the dependency paths from a target back to a source. The syntax is `T -?> S` where `T` is the target, `?` is the search depth, and `S` is the source. Leaving `S` blank will query for dependencies rather than paths. `?` can be a number or `*` for unlimited depth, and an empty `?` defaults to depth `*`. For example, buck query '//:android-binary ->' searches for all immediate dependencies of //:android-binary. Each time the command is run, a neo4j instance is spun up and the dependency graph information is fed to neo4j. Then we construct a breadth-first traverser to crawl the graph depending on the query. Adding more sophisticated queries should be straightforward given the neo4j traversal API. Test Plan: Run the unit tests in `ant test`, which includes a new QueryCommandTest to test the new command.
Buck is an Android build tool. To see what Buck can do for you, check out the documentation at http://facebook.github.io/buck/.
To build Buck, run the following:
git clone git@github.com:facebook/buck.git cd buck ant ./bin/buck --help
Apache License 2.0