-
-
Notifications
You must be signed in to change notification settings - Fork 612
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[engine] Initial Trace implementation for rust engine (#4076)
Problem ---------- Re-implementing trace was deferred during the initial work on the Rust scheduler. See #4007. Solution ---------- This patch partially reintroduces it. The rust implementation will now produce traces that include the subjects and some of the information about failures. Some types of failures will not have good messages yet. This is because we haven't landed a patch to fix #4025. Also, the trace function will produce traces for each of the roots. Result ------- Example output: $ echo "WUT" >> BUILD.tools $ ./pants --enable-v2-engine list //: Exception caught: (<class 'pants.build_graph.address_lookup_error.AddressLookupError'>) File "/.../pants/src/python/pants/bin/pants_exe.py", line 50, in <module> main() File "/.../pants/src/python/pants/bin/pants_exe.py", line 44, in main PantsRunner(exiter).run() File "/.../pants/src/python/pants/bin/pants_runner.py", line 57, in run options_bootstrapper=options_bootstrapper) File "/.../pants/src/python/pants/bin/pants_runner.py", line 46, in _run return LocalPantsRunner(exiter, args, env, options_bootstrapper=options_bootstrapper).run() File "/.../pants/src/python/pants/bin/local_pants_runner.py", line 37, in run self._run() File "/.../pants/src/python/pants/bin/local_pants_runner.py", line 77, in _run self._exiter).setup() File "/.../pants/src/python/pants/bin/goal_runner.py", line 184, in setup goals, context = self._setup_context() File "/.../pants/src/python/pants/bin/goal_runner.py", line 157, in _setup_context self._daemon_graph_helper File "/.../pants/src/python/pants/bin/goal_runner.py", line 101, in _init_graph graph, address_mapper = graph_helper.create_build_graph(target_roots, self._root_dir) File "/.../pants/src/python/pants/bin/engine_initializer.py", line 88, in create_build_graph for _ in graph.inject_specs_closure(target_roots.as_specs()): File "/.../pants/src/python/pants/engine/legacy/graph.py", line 205, in inject_specs_closure for address in self._inject(specs): File "/.../pants/src/python/pants/engine/legacy/graph.py", line 225, in _inject self._index(target_entries) File "/.../pants/src/python/pants/engine/legacy/graph.py", line 83, in _index 'Build graph construction failed for {}:\n{}'.format(node, trace)) Exception message: Build graph construction failed for (SiblingAddresses(directory=u''), Select(Collection.of(HydratedTarget))): Computing =Collection.of(HydratedTarget) for SiblingAddresses(directory=u'') Computing =Collection.of(HydratedTarget) for SiblingAddresses(directory=u'') Computing =HydratedTarget for SiblingAddresses(directory=u'') Computing =Collection.of(Address) for SiblingAddresses(directory=u'') Computing =Collection.of(Address) for SiblingAddresses(directory=u'') Computing =AddressFamily for SiblingAddresses(directory=u'') Computing =AddressFamily for Dir(path=u'') Computing =AddressFamily for Dir(path=u'') Throw("EntryId(17) failed!") Computing =Collection.of(Address) for SiblingAddresses(directory=u'') Computing =Collection.of(Address) for SiblingAddresses(directory=u'') Computing =AddressFamily for SiblingAddresses(directory=u'') Computing =AddressFamily for Dir(path=u'') Computing =AddressFamily for Dir(path=u'') Throw("EntryId(17) failed!") Testing -------- Local manual testing with ./pants list and a corrupted BUILD file. Running tests that had been skipped due to this feature being missing. CI away on #4076
- Loading branch information
1 parent
e35dc2e
commit 37122df
Showing
14 changed files
with
190 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
da39a3ee5e6b4b0d3255bfef95601890afd80709 | ||
538c578313e7557de31b62f90f193d5430334de7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.