commit | d872eeb306328aa16f4ef9ef179a765a376eeb13 | [log] [tgz] |
---|---|---|
author | Edward Gan <edgan@fb.com> | Tue Oct 15 13:13:03 2013 -0700 |
committer | Michael Bolin <mbolin@fb.com> | Thu Oct 24 20:50:47 2013 -0700 |
tree | ae358e86a79d62e5d7b586b783f03b78aa7b06c2 | |
parent | 8f050f12971b70d69ca6c807f482c35feb0e779d [diff] |
`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