Uh oh!
There was an error while loading. Please reload this page.
[incremental] Add support for eval always queries - #45353
Conversation
rust-highfive
commented
Oct 18, 2017
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
wesleywiser
commented
Oct 18, 2017
michaelwoerister
left a comment
There was a problem hiding this comment.
Looking good, except for the result fingerprinting being missing. Since we essentially disable dependency tracking for this tasks its even more important for them to be fingerprinted.
If you add the fingerprint, however, I guess there'll be a lot of code duplication between with_untracked_task and with_task. Maybe one can be implemented in the terms of the other.
I'm also a bit skeptical about the term untracked since it rather suggests the functionality that we already have with ignore.
There was a problem hiding this comment.
You should be able to make the push and the pop methods here private.
There was a problem hiding this comment.
Since this line is getting a little long, it would be more readable to have each arm on its own line.
Hm, it looks like implementing pubfnwith_xxx_task<C,A,R,HCX>(&self,key:DepNode,cx:C,arg:A,task:fn(C,A) -> R)
-> (R,DepNodeIndex){self.with_task(key, cx, arg, |cx, arg| {// Explicitly add the read to the Krate nodeself.read(DepNode::Krate);// Execute the task without recording any other readsself.with_ignore(|| {task(cx, arg)})})}But |
wesleywiser
commented
Oct 18, 2017
Thanks for the review! What about something like "crate-wide query"? I'm also fine just changing it to "eval-always". |
michaelwoerister
commented
Oct 18, 2017
Yeah, let's stick to "eval-always". It's not a pretty name but it conveys the underlying concept well enough. |
38b3aa5 to
9794bb5Comparewesleywiser
commented
Oct 21, 2017
@michaelwoerister I fixed up the commit per your feedback. |
michaelwoerister
commented
Oct 23, 2017
@wesleywiser Yes, that looks very good now! If you want to continue working on this, I suggest just appending to this PR. |
wesleywiser
commented
Oct 25, 2017
@michaelwoerister Thanks! Pushed three new commits. |
michaelwoerister
commented
Oct 25, 2017
Looks very good! I'm seeing this error on travis: This suggests that we are re-running queries although they've already been marked as green. This is because we are not doing the whole Thinking about it some more, there should really be no reason to treat an eval-always query different from a regular one, except for the changes you already implemented in rust/src/librustc/ty/maps/plumbing.rs Lines 433 to 442 in b247805 That should also not introduce any code duplication. Let me know if you have any questions about this change of strategy. |
wesleywiser
commented
Oct 26, 2017
Hmmm... I can't seem to repro that. Regardless, I can certainly revert the changes to |
michaelwoerister
commented
Oct 26, 2017
You are probably building with debug assertions disabled. I generally recommend setting I imagine the updated profq_msg!(tcx,ProfileQueriesMsg::ProviderBegin);let res = tcx.cycle_check(span,Query::$name(key), || { tcx.sess.diagnostic().track_diagnostics(|| {if dep_node.is_eval_always(){
tcx.dep_graph.with_eval_always_task(dep_node, tcx, key,Self::compute_result)}else{
tcx.dep_graph.with_task(dep_node, tcx, key,Self::compute_result)}})})?;profq_msg!(tcx,ProfileQueriesMsg::ProviderEnd);This way eval-always tasks are treated the same as regular with the only exception of what reads are recorded from them. |
wesleywiser
commented
Oct 26, 2017
Oh got it. That makes sense.
Thanks! I'll do that. |
9e3be26 to
8281e88Comparewesleywiser
commented
Oct 27, 2017
@michaelwoerister Done |
michaelwoerister
commented
Oct 27, 2017
Awesome, thank you so much @wesleywiser! @bors r+ |
bors
commented
Oct 27, 2017
📌 Commit 8281e88 has been approved by |
bors
commented
Oct 27, 2017
[incremental] Add support for eval always queries Part of #45238
bors
commented
Oct 27, 2017
☀️ Test successful - status-appveyor, status-travis |
wesleywiser
commented
Oct 27, 2017
Thanks for all the help @michaelwoerister!! |
michaelwoerister
commented
Oct 27, 2017
You're welcome! |
…=michaelwoerister remove outdated comment rust-lang#44234 was closed, apparently solved by rust-lang#45353 r? @michaelwoerister
…eyouxu remove outdated comment rust-lang#44234 was closed, apparently solved by rust-lang#45353
Rollup merge of rust-lang#131965 - ChrisDenton:outdated-comment, r=jieyouxu remove outdated comment rust-lang#44234 was closed, apparently solved by rust-lang#45353
Part of #45238