This repository has been archived by the owner on Dec 10, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Output exception details on leaf trace nodes as opposed to lots of repetitions as linked in the bug. 2. newline Throw for clarity. Testing Done: https://travis-ci.org/pantsbuild/pants/builds/138217773 [tw-mbp-yic pants (3535_b)]$ ./pants --enable-v2-engine dependees examples/tests/:: Exception caught: (<class 'pants.build_graph.address_lookup_error.AddressLookupError'>) File "/Users/yic/workspace/pants/src/python/pants/bin/pants_exe.py", line 50, in <module> main() File "/Users/yic/workspace/pants/src/python/pants/bin/pants_exe.py", line 44, in main PantsRunner(exiter).run() File "/Users/yic/workspace/pants/src/python/pants/bin/pants_runner.py", line 57, in run options_bootstrapper=options_bootstrapper) File "/Users/yic/workspace/pants/src/python/pants/bin/pants_runner.py", line 46, in _run return LocalPantsRunner(exiter, args, env, options_bootstrapper=options_bootstrapper).run() File "/Users/yic/workspace/pants/src/python/pants/bin/local_pants_runner.py", line 53, in run self._maybe_profiled(self._run) File "/Users/yic/workspace/pants/src/python/pants/bin/local_pants_runner.py", line 50, in _maybe_profiled runner() File "/Users/yic/workspace/pants/src/python/pants/bin/local_pants_runner.py", line 93, in _run self._exiter).setup() File "/Users/yic/workspace/pants/src/python/pants/bin/goal_runner.py", line 84, in __init__ build_graph) File "/Users/yic/workspace/pants/src/python/pants/bin/goal_runner.py", line 99, in _select_buildgraph return graph_helper.create_graph(root_specs) File "/Users/yic/workspace/pants/src/python/pants/bin/engine_initializer.py", line 70, in create_graph for _ in graph.inject_specs_closure(spec_roots): # Ensure the entire generator is unrolled. File "/Users/yic/workspace/pants/src/python/pants/engine/legacy/graph.py", line 171, in inject_specs_closure for address in self._inject(specs): File "/Users/yic/workspace/pants/src/python/pants/engine/legacy/graph.py", line 183, in _inject self._index(request.roots) File "/Users/yic/workspace/pants/src/python/pants/engine/legacy/graph.py", line 68, in _index 'Build graph construction failed for {}:\n{}'.format(node.subject, trace)) Exception message: Build graph construction failed for DescendantAddresses(directory='examples/tests'): Computing LegacyTarget for DescendantAddresses(directory='examples/tests') Computing LegacyTarget for examples/tests/scala/org/pantsbuild/example/hello/welcome:welcome Computing LegacyTarget for examples/src/scala/org/pantsbuild/example/hello/welcome:welcome Computing LegacyTarget for examples/src/java/org/pantsbuild/example/hello/greet:greet Computing TargetAdaptor for examples/src/java/org/pantsbuild/example/hello/greet:greet Computing Struct for examples/src/java/org/pantsbuild/example/hello/greet:greet Computing UnhydratedStruct for examples/src/java/org/pantsbuild/example/hello/greet:greet Computing AddressFamily for Dir(path=u'examples/src/java/org/pantsbuild/example/hello/greet') Throw(exc=MappingError(u"Failed to parse examples/src/java/org/pantsbuild/example/hello/greet/BUILD:\nname 'abc' is not defined",)) Computing LegacyTarget for examples/tests/java/org/pantsbuild/example/hello/greet:greet Throw(exc=MappingError(u"Failed to parse examples/src/java/org/pantsbuild/example/hello/greet/BUILD:\nname 'abc' is not defined",)) Bugs closed: 3535, 3584 Reviewed at https://rbcommons.com/s/twitter/r/3992/
- Loading branch information