Adjust wording of comment
This commit is contained in:
parent
28f19f62c7
commit
27ed52c0a2
1 changed files with 13 additions and 8 deletions
|
@ -185,20 +185,20 @@ impl<K: DepKind> DepGraph<K> {
|
||||||
///
|
///
|
||||||
/// `A -> B -> C`
|
/// `A -> B -> C`
|
||||||
///
|
///
|
||||||
/// Suppose that decoding the result of query `B` required invoking
|
/// Suppose that decoding the result of query `B` required re-computing
|
||||||
/// a query `D`. If we did not create a fresh `TaskDeps` when
|
/// the query `C`. If we did not create a fresh `TaskDeps` when
|
||||||
/// decoding `B`, we might would still be using the `TaskDeps` for query `A`
|
/// decoding `B`, we would still be using the `TaskDeps` for query `A`
|
||||||
/// (if we needed to re-execute `A`). This would cause us to create
|
/// (if we needed to re-execute `A`). This would cause us to create
|
||||||
/// a new edge `A -> D`. If this edge did not previously
|
/// a new edge `A -> C`. If this edge did not previously
|
||||||
/// exist in the `DepGraph`, then we could end up with a different
|
/// exist in the `DepGraph`, then we could end up with a different
|
||||||
/// `DepGraph` at the end of compilation, even if there were no
|
/// `DepGraph` at the end of compilation, even if there were no
|
||||||
/// meaningful changes to the overall program (e.g. a newline was added).
|
/// meaningful changes to the overall program (e.g. a newline was added).
|
||||||
/// In addition, this edge might cause a subsequent compilation run
|
/// In addition, this edge might cause a subsequent compilation run
|
||||||
/// to try to force `D` before marking other necessary nodes green. If
|
/// to try to force `C` before marking other necessary nodes green. If
|
||||||
/// `D` did not exist in the new compilation session, then we might
|
/// `C` did not exist in the new compilation session, then we could
|
||||||
/// get an ICE. Normally, we would have tried (and failed) to mark
|
/// get an ICE. Normally, we would have tried (and failed) to mark
|
||||||
/// some other query green (e.g. `item_children`) which was used
|
/// some other query green (e.g. `item_children`) which was used
|
||||||
/// to obtain `D`, which would prevent us from ever trying to force
|
/// to obtain `C`, which would prevent us from ever trying to force
|
||||||
/// a non-existent `D`.
|
/// a non-existent `D`.
|
||||||
///
|
///
|
||||||
/// It might be possible to enforce that all `DepNode`s read during
|
/// It might be possible to enforce that all `DepNode`s read during
|
||||||
|
@ -208,7 +208,12 @@ impl<K: DepKind> DepGraph<K> {
|
||||||
/// of `B`, this would result in an edge `B -> D`. If that edge already
|
/// of `B`, this would result in an edge `B -> D`. If that edge already
|
||||||
/// existed (with the same `DepPathHash`es), then it should be correct
|
/// existed (with the same `DepPathHash`es), then it should be correct
|
||||||
/// to allow the invocation of the query to proceed during deserialization
|
/// to allow the invocation of the query to proceed during deserialization
|
||||||
/// of a query result. However, this would require additional complexity
|
/// of a query result. We would merely assert that the dep-graph fragment
|
||||||
|
/// that would have been added by invoking `C` while decoding `B`
|
||||||
|
/// is equivalent to the dep-graph fragment that we already instantiated for B
|
||||||
|
/// (at the point where we successfully marked B as green).
|
||||||
|
///
|
||||||
|
/// However, this would require additional complexity
|
||||||
/// in the query infrastructure, and is not currently needed by the
|
/// in the query infrastructure, and is not currently needed by the
|
||||||
/// decoding of any query results. Should the need arise in the future,
|
/// decoding of any query results. Should the need arise in the future,
|
||||||
/// we should consider extending the query system with this functionality.
|
/// we should consider extending the query system with this functionality.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue