Skip to content

Edit rustc_middle::dep_graph module documentation - #80325

Closed
pierwill wants to merge 2 commits into
rust-lang:masterfrom
pierwill:rustcmiddle-depgraph-docs
Closed

Edit rustc_middle::dep_graph module documentation#80325
pierwill wants to merge 2 commits into
rust-lang:masterfrom
pierwill:rustcmiddle-depgraph-docs

Conversation

@pierwill

Copy link
Copy Markdown
Contributor

The first commit here moves the content to mod.rs, the second contains edits.

The section I've called "DepNode creation and 'inference'" appears to have some outdated material. (DepConstructor is a struct, not an enum.)

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @estebank

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 23, 2020
@jyn514

Copy link
Copy Markdown
Member

r? @cjgillot

@cjgillot

Copy link
Copy Markdown
Contributor

You may also want to edit the docs for rustc_query_system::dep_graph::dep_node, which are a copy-paste of those for rustc_middle::dep_graph::dep_node.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The define_dep_nodes macro is defined in dep_node.rs.
It defines the DepKind enum, and DepConstructor.
DepNode is defined in rustc_query_system::dep_graph::dep_node.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Drive-by: DepConstructor should really just be a mod, since all it does is provide a namespace for functions constructing DepNodes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am not sure the API is that restricted any more. There is an escape hatch DepNode::new_no_params which is used in non-incremental runs.

@jyn514

Copy link
Copy Markdown
Member

You may also want to edit the docs for rustc_query_system::dep_graph::dep_node, which are a copy-paste of those for rustc_middle::dep_graph::dep_node.

Maybe that module should link to rustc_middle instead? Or use doc = include_str! to make sure they're kept in sync?

@jyn514jyn514 added A-contributor-roadblock Area: Makes things more difficult for new or seasoned contributors to Rust A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) labels Dec 24, 2020
@bors

bors commented Jan 8, 2021

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #78452) made this pull request unmergeable. Please resolve the merge conflicts.

@jyn514jyn514 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 8, 2021
@jyn514jyn514 mentioned this pull request Jan 8, 2021
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Jan 14, 2021
…erister
Get rid of `DepConstructor`
This removes fully 235 unused functions.
Follow-up to rust-lang#80325 (comment).
r? `@michaelwoerister`
cc `@cjgillot`
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Jan 14, 2021
…erister
Get rid of `DepConstructor`
This removes fully 235 unused functions.
Follow-up to rust-lang#80325 (comment).
r? ``@michaelwoerister``
cc ``@cjgillot``
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web)(plain)

Click to see the possible cause of the failure (guessed by this bot)
 SCCACHE_BUCKET: rust-lang-ci-sccache2
TOOLSTATE_REPO: https://github.com/rust-lang-nursery/rust-toolstate
CACHE_DOMAIN: ci-caches.rust-lang.org
EXTRA_VARIABLES: {
"CI_ONLY_WHEN_SUBMODULES_CHANGED": 1
##[endgroup]
adding extra environment variable CI_ONLY_WHEN_SUBMODULES_CHANGED
linux builder detected, using docker to run the build
##[group]Run src/ci/scripts/should-skip-this.sh
---
######################################################################## 100.0%
extracting /checkout/obj/build/cache/2020-11-19/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz
Updating crates.io index
Updating git repository `https://github.com/rust-lang/cargo`
Updating git repository `https://github.com/rust-lang/rustfmt`
error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, use the --offline flag.
Build completed unsuccessfully in 0:00:41
make: *** [prepare] Error 1
Makefile:60: recipe for target 'prepare' failed
Command failed. Attempt 2/5:
Command failed. Attempt 2/5:
Updating crates.io index
Updating git repository `https://github.com/rust-lang/cargo`
Updating git repository `https://github.com/rust-lang/rustfmt`
error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, use the --offline flag.
Build completed unsuccessfully in 0:00:01
make: *** [prepare] Error 1
Makefile:60: recipe for target 'prepare' failed
Command failed. Attempt 3/5:
Command failed. Attempt 3/5:
Updating crates.io index
Updating git repository `https://github.com/rust-lang/cargo`
Updating git repository `https://github.com/rust-lang/rustfmt`
error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, use the --offline flag.
Build completed unsuccessfully in 0:00:00
make: *** [prepare] Error 1
Makefile:60: recipe for target 'prepare' failed
Command failed. Attempt 4/5:
Command failed. Attempt 4/5:
Updating crates.io index
Updating git repository `https://github.com/rust-lang/cargo`
Updating git repository `https://github.com/rust-lang/rustfmt`
error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, use the --offline flag.
Build completed unsuccessfully in 0:00:00
make: *** [prepare] Error 1
Makefile:60: recipe for target 'prepare' failed
Command failed. Attempt 5/5:
Command failed. Attempt 5/5:
Updating crates.io index
Updating git repository `https://github.com/rust-lang/cargo`
Updating git repository `https://github.com/rust-lang/rustfmt`
error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, use the --offline flag.
Build completed unsuccessfully in 0:00:00
make: *** [prepare] Error 1
Makefile:60: recipe for target 'prepare' failed
The command has failed after 5 attempts.

@pierwill

Copy link
Copy Markdown
ContributorAuthor

Not at all sure I did this rebase correctly... 🤔

@bors

bors commented Jan 17, 2021

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #81093) made this pull request unmergeable. Please resolve the merge conflicts.

@pierwill
pierwill deleted the rustcmiddle-depgraph-docs branch February 17, 2021 18:51
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustA-query-systemArea: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)S-waiting-on-authorStatus: This is awaiting some action (such as code changes or more information) from the author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@pierwill@rust-highfive@jyn514@cjgillot@bors@rust-log-analyzer@estebank