-
Notifications
You must be signed in to change notification settings - Fork 553
Add "The Query Evaluation Model in Detail" Chapter. #270
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
Add "The Query Evaluation Model in Detail" Chapter. #270
Conversation
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.
LGTM apart from the typo!
Thanks for writing this up!
abe16c9
to
54bf204
Compare
Thanks for taking a look, @mark-i-m! The typo should be fixed. |
Personally, I think this is ready to merge, but I can wait for Niko if you want. |
let hir_map = ...; | ||
|
||
// Create the query context `tcx` | ||
let tcx = TyCtxt::new(cli_options, hir_map); |
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.
This is probably a dumb question, but why is the query context called TyCtxt
? I'd have thought it would be called QryCtxt
or QCtxt
or something.
It's been that way as long as I can remember and I assumed it was short for "type context" or something.
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.
The tcx
is called "type context" or "type checking context" purely for historical reasons, I'd say. There's been talk about renaming to "query context" (e.g. qx
or qcx
) for a while. For now, the tcx
acts the query context (and does a few other things too).
It would be good to document how to find implementations (local and cross-crate) for a specific query. For a query |
I just added a chapter with a more detailed description of incremental compilation. It is not entirely complete yet but I think it would be good to merge anyway so that people can read it before the All Hands. The most important parts are already there. |
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.
Thanks!
@michaelwoerister r=me, but travis is failing due to a broken link. |
`DefPath`. The two contain the same information and we mostly use the | ||
`DefPathHash` because it simpler to handle, being `Copy` and self-contained. | ||
|
||
This principle of stable identifiers is used to make the data in the on-disk |
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.
This principle of stable identifiers is used to make the data in the on-disk | |
This principle of stable identifiers is used to make the data on disk |
src/SUMMARY.md
Outdated
@@ -20,7 +20,9 @@ | |||
- [The Rustc Driver](./rustc-driver.md) | |||
- [Rustdoc](./rustdoc.md) | |||
- [Queries: demand-driven compilation](./query.md) | |||
- [The Query Evaluation Model in Detail](./queries/query-evaluation-model-in-detail.md) | |||
- [Incremental compilation](./incremental-compilation.md) |
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.
Perhaps move the Incremental Compilation
chapter to the queries/
directory too?
92c5497
to
c6f1f96
Compare
c6f1f96
to
808a9a1
Compare
@mark-i-m, the mentioned problems should all be addressed. |
Do changes show up automatically at https://rust-lang.github.io/rustc-guide/? |
In theory, yes... I’m not sure why they aren’t. |
It was a spurious failure in CI. It should deploy shortly. |
This chapter contains some more detailed information about the theory behind queries.
r? @nikomatsakis