pantsbuild/pants — pull request #160 by gmalmquist (2014-05-27 19:58:28+00:00)
Title: Garrett/antlrtest

Trying to add a Java Antlr library (testing with a Json grammar), pants fails to build (crashing on the json target). Using .../BUILD at the end, bundle instead of binary, etc all produces the same result.

```
~/Development/pants garrett/antlrtest ./pants goal binary src/java/com/pants/examples/antlr
Traceback (most recent call last):
File "/Users/gmalmquist/Development/pants/pants.pex/pants/base/build_file_parser.py", line 90, in to_target
**self.kwargs).with_description(self.description)
TypeError: __init__() got an unexpected keyword argument 'build_graph'
ERROR:pants.base.build_file_parser:Failed to instantiate Target with type with name "json" from src/antlr/com/pants/examples/json/BUILD
Traceback (most recent call last):
File "/Users/gmalmquist/Development/pants/pants.pex/pants/base/build_file_parser.py", line 90, in to_target
**self.kwargs).with_description(self.description)
TypeError: __init__() got an unexpected keyword argument 'build_graph'
Traceback (most recent call last):
File "/Users/gmalmquist/Development/pants/pants.pex/.bootstrap/_twitter_common_python/pex.py", line 223, in execute
self.execute_entry(entry_point, args)
File "/Users/gmalmquist/Development/pants/pants.pex/.bootstrap/_twitter_common_python/pex.py", line 271, in execute_entry
runner(entry_point)
File "/Users/gmalmquist/Development/pants/pants.pex/.bootstrap/_twitter_common_python/pex.py", line 294, in execute_pkg_resources
runner()
File "/Users/gmalmquist/Development/pants/pants.pex/pants/bin/pants_exe.py", line 169, in main
_run()
File "/Users/gmalmquist/Development/pants/pants.pex/pants/bin/pants_exe.py", line 137, in _run
command = command_class(run_tracker, root_dir, parser, command_args)
File "/Users/gmalmquist/Development/pants/pants.pex/pants/commands/goal.py", line 85, in __init__
Command.__init__(self, run_tracker, root_dir, parser, args)
File "/Users/gmalmquist/Development/pants/pants.pex/pants/commands/command.py", line 114, in __init__
self.setup_parser(parser, args)
File "/Users/gmalmquist/Development/pants/pants.pex/pants/commands/goal.py", line 157, in setup_parser
self.build_graph)
File "/Users/gmalmquist/Development/pants/pants.pex/pants/base/build_file_parser.py", line 275, in inject_spec_closure_into_build_graph
self.inject_address_closure_into_build_graph(address, build_graph, addresses_already_closed)
File "/Users/gmalmquist/Development/pants/pants.pex/pants/base/build_file_parser.py", line 250, in inject_address_closure_into_build_graph
addresses_already_closed)
File "/Users/gmalmquist/Development/pants/pants.pex/pants/base/build_file_parser.py", line 251, in inject_address_closure_into_build_graph
target = target_proxy.to_target(build_graph)
File "/Users/gmalmquist/Development/pants/pants.pex/pants/base/build_file_parser.py", line 90, in to_target
**self.kwargs).with_description(self.description)
TypeError: __init__() got an unexpected keyword argument 'build_graph'
```