Skip to content
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

Only create OnDiskCache in incremental compilation mode #79216

Merged
merged 1 commit into from
Nov 25, 2020

Conversation

Aaron1011
Copy link
Member

This lets us skip doing useless work when we're not in incremental
compilation mode.

This lets us skip doing useless work when we're not in incremental
compilation mode.
@rust-highfive
Copy link
Collaborator

r? @oli-obk

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 19, 2020
@Aaron1011
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented Nov 19, 2020

⌛ Trying commit d00ed01 with merge 7ae610e245278cb0996eebc08f707e48e63ea9b7...

if sess.opts.incremental.is_none() {
return OnDiskCache::new_empty(sess.source_map());
return None;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new_empty should be cheap.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but we want to skip running any operations on it (e.g. storing diagnostics, looking up query results). The alternative would be to insert checks for incremental mode into all of the methods in OnDiskCache

@bors
Copy link
Contributor

bors commented Nov 19, 2020

☀️ Try build successful - checks-actions
Build commit: 7ae610e245278cb0996eebc08f707e48e63ea9b7 (7ae610e245278cb0996eebc08f707e48e63ea9b7)

@rust-timer
Copy link
Collaborator

Queued 7ae610e245278cb0996eebc08f707e48e63ea9b7 with parent fe98231, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (7ae610e245278cb0996eebc08f707e48e63ea9b7): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never
@rustbot modify labels: +S-waiting-on-review -S-waiting-on-perf

@pnkfelix
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 25, 2020

📌 Commit d00ed01 has been approved by pnkfelix

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 25, 2020
@pnkfelix
Copy link
Member

@bors rollup-

@bors
Copy link
Contributor

bors commented Nov 25, 2020

⌛ Testing commit d00ed01 with merge db79d2f...

@bors
Copy link
Contributor

bors commented Nov 25, 2020

☀️ Test successful - checks-actions
Approved by: pnkfelix
Pushing db79d2f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 25, 2020
@bors bors merged commit db79d2f into rust-lang:master Nov 25, 2020
@rustbot rustbot added this to the 1.50.0 milestone Nov 25, 2020
This was referenced Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants