-
-
Notifications
You must be signed in to change notification settings - Fork 637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[engine] Initial Trace implementation for rust engine #4076
[engine] Initial Trace implementation for rust engine #4076
Conversation
Unfortunately, this still has some proof of concept bits in it. But, it does provide traces. My caveat is that the traces do not include node information or the message from the failure. But you do see the subjects and the overall structure. Additionally they print to stdout.
… truncate Also, add 4025 to skips where relevant
Had a couple isort errors in ...tasks2. Fixed those.
This patch was initially reviewed on https://rbcommons.com/s/twitter/r/4392/ |
I've been skipping over these because I know ~nothing about Rust. On Fri, Nov 18, 2016 at 6:19 PM, Nick Howard [email protected]
|
@@ -45,6 +45,16 @@ impl Scheduler { | |||
self.graph.visualize(&self.roots, path, &self.tasks.externs) | |||
} | |||
|
|||
pub fn trace(&self, path: &Path) -> io::Result<()> { | |||
for root in &self.roots { | |||
let result = self.graph.trace(&root, path, &self.tasks.externs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be equivalent to wrap this line in try!()
... equivalent the new ?
operator: https://blog.rust-lang.org/2016/11/10/Rust-1.13.html
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:
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