From 56fa1c6fc43e68bab90c49eee184a359165007fe Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Sat, 26 Nov 2022 16:35:38 +0200 Subject: [PATCH 1/3] do an actual link to detect if it breaks in future --- src/queries/incremental-compilation-in-detail.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/queries/incremental-compilation-in-detail.md b/src/queries/incremental-compilation-in-detail.md index 5b30f227a..438b4a073 100644 --- a/src/queries/incremental-compilation-in-detail.md +++ b/src/queries/incremental-compilation-in-detail.md @@ -175,11 +175,12 @@ fn try_mark_green(tcx, current_node) -> bool { true } - -// Note: The actual implementation can be found in -// compiler/rustc_query_system/src/dep_graph/graph.rs ``` +> NOTE: +> The actual implementation can be found in +> [compiler/rustc_query_system/src/dep_graph/graph.rs][try_mark_green] + By using red-green marking we can avoid the devastating cumulative effect of having false positives during change detection. Whenever a query is executed in incremental mode, we first check if its already green. If not, we run @@ -187,7 +188,6 @@ in incremental mode, we first check if its already green. If not, we run invoke the query provider to re-compute the result. - ## The Real World: How Persistence Makes Everything Complicated The sections above described the underlying algorithm for incremental @@ -533,5 +533,5 @@ be reusable. See for more information. - [query-model]: ./query-evaluation-model-in-detail.html +[try_mark_green]: https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_query_system/dep_graph/graph.rs.html#574-599 From 4a2cbaa85dd895819e313042c5a8f2a1a4d38f86 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Sat, 26 Nov 2022 23:37:16 +0200 Subject: [PATCH 2/3] accept review suggestion Co-authored-by: Noah Lev --- src/queries/incremental-compilation-in-detail.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/queries/incremental-compilation-in-detail.md b/src/queries/incremental-compilation-in-detail.md index 438b4a073..e05b5b760 100644 --- a/src/queries/incremental-compilation-in-detail.md +++ b/src/queries/incremental-compilation-in-detail.md @@ -179,7 +179,7 @@ fn try_mark_green(tcx, current_node) -> bool { > NOTE: > The actual implementation can be found in -> [compiler/rustc_query_system/src/dep_graph/graph.rs][try_mark_green] +> [`compiler/rustc_query_system/src/dep_graph/graph.rs`][try_mark_green] By using red-green marking we can avoid the devastating cumulative effect of having false positives during change detection. Whenever a query is executed From 06f90ffe15ae0eb02bfb936e65a4deea33faaa8e Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Sat, 26 Nov 2022 23:37:45 +0200 Subject: [PATCH 3/3] accept review suggestion Co-authored-by: Noah Lev --- src/queries/incremental-compilation-in-detail.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/queries/incremental-compilation-in-detail.md b/src/queries/incremental-compilation-in-detail.md index e05b5b760..abd2b0155 100644 --- a/src/queries/incremental-compilation-in-detail.md +++ b/src/queries/incremental-compilation-in-detail.md @@ -534,4 +534,4 @@ information. [query-model]: ./query-evaluation-model-in-detail.html -[try_mark_green]: https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_query_system/dep_graph/graph.rs.html#574-599 +[try_mark_green]: https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_query_system/dep_graph/graph.rs.html