Skip to content

Document all public items in rustc_incremental - #90407

Merged
bors merged 1 commit into
rust-lang:masterfrom
pierwill:edit-rustc-incremental-docs
Dec 11, 2021
Merged

Document all public items in rustc_incremental#90407
bors merged 1 commit into
rust-lang:masterfrom
pierwill:edit-rustc-incremental-docs

Conversation

@pierwill

Copy link
Copy Markdown
Contributor

Also:

  • Review and edit current docs
  • Enforce documentation for the module.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @cjgillot

(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 Oct 29, 2021
Comment threadcompiler/rustc_incremental/src/persist/fs.rs Outdated
Comment threadcompiler/rustc_incremental/src/persist/load.rs Outdated
Comment threadcompiler/rustc_incremental/src/persist/load.rs Outdated
Comment threadcompiler/rustc_incremental/src/persist/load.rs Outdated
Comment threadcompiler/rustc_incremental/src/persist/save.rs Outdated
Comment threadcompiler/rustc_incremental/src/persist/save.rs Outdated
Comment threadcompiler/rustc_incremental/src/persist/fs.rs Outdated
Comment threadcompiler/rustc_incremental/src/persist/fs.rs Outdated
Comment threadcompiler/rustc_incremental/src/persist/fs.rs Outdated
Comment threadcompiler/rustc_incremental/src/persist/fs.rs Outdated
Comment threadcompiler/rustc_incremental/src/persist/fs.rs Outdated
@pierwill

pierwill commented Oct 29, 2021

Copy link
Copy Markdown
ContributorAuthor

Thank you, @r00ster91! I forgot the recommend style.

@pierwill
pierwillforce-pushed the edit-rustc-incremental-docs branch from 3e02dc8 to 3ee4b6bCompareOctober 29, 2021 18:08

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is the difference between the return values of these functions? Can you expand on this in the doc comments?

@pierwillpierwillOct 29, 2021

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I removed references to "the current session". The signature tells the story, here, it seems.

How do these function docs look to you, @cjgillot?

https://github.com/rust-lang/rust/blob/cac82a28bd7a780b86a581648685f439a76153ee/compiler/rustc_incremental/src/persist/fs.rs#L136-L155

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.

Can you expand a bit on what those path represent? I mean:

  • what are stored in all these files?
  • the difference between dep-graph and staging dep-graph?
  • what are work products?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I'm not sure how to describe the query cache here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It garbage collects all incremental session directories except the current session, right?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Good question. I'll double check.

@pierwillpierwillOct 29, 2021

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

The garbage collection logic is complex enough here that I wouldn't feel comfortable discussing its behavior in the public doc comment without input from someone familiar with this code. (Although I suspect you are right!)

@pierwill
pierwillforce-pushed the edit-rustc-incremental-docs branch from cac82a2 to cc9c544CompareOctober 29, 2021 19:54
@bjorn3
bjorn3 removed their request for review November 1, 2021 14:18
@pierwill
pierwill requested a review from bjorn3November 1, 2021 18:50
@pierwill
pierwillforce-pushed the edit-rustc-incremental-docs branch from d2f3a3a to 1eea8acCompareNovember 2, 2021 16:13

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.

Can you expand a bit on what those path represent? I mean:

  • what are stored in all these files?
  • the difference between dep-graph and staging dep-graph?
  • what are work products?

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.

This function is only used once, with the current session's directory. Is there a reason to keep it, or should it be replaced by dep_graph_path?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

If it's inlined, DEP_GRAPH_FILENAME has to be made public. I think it makes sense to have all these in one place, even if the function is only used once.

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 don't mean inlining it. I mean using dep_graph_path instead.

Comment threadcompiler/rustc_incremental/src/persist/load.rs Outdated
Comment threadcompiler/rustc_incremental/src/persist/save.rs Outdated
Comment threadcompiler/rustc_incremental/src/persist/save.rs Outdated
Comment threadcompiler/rustc_incremental/src/persist/save.rs Outdated

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.

This function is never used outside the crate.

Comment threadcompiler/rustc_incremental/src/persist/work_product.rs Outdated
@apirainoapiraino added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Nov 11, 2021
@bors

bors commented Nov 12, 2021

Copy link
Copy Markdown
Collaborator

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

@pierwill
pierwillforce-pushed the edit-rustc-incremental-docs branch from 3941f5f to a358d3bCompareNovember 12, 2021 15:17
@bors

bors commented Nov 18, 2021

Copy link
Copy Markdown
Collaborator

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

@cjgillot

Copy link
Copy Markdown
Contributor

r=me after rebase. Thanks @pierwill !

@cjgillotcjgillot 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 Nov 27, 2021
@pierwill
pierwillforce-pushed the edit-rustc-incremental-docs branch 2 times, most recently from 3602c51 to fa054cfCompareDecember 6, 2021 15:47
@pierwill

Copy link
Copy Markdown
ContributorAuthor

r=me after rebase. Thanks @pierwill !

ping @cjgillot :)

@cjgillot

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Dec 6, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit fa054cf has been approved by cjgillot

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 7, 2021
…s, r=cjgillot
Document all public items in `rustc_incremental`
Also:
- Review and edit current docs
- Enforce documentation for the module.
@matthiaskrgr

Copy link
Copy Markdown
Member

@bors r-
failed in rollup
#91621 (comment)

@borsbors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 7, 2021
@pierwill

Copy link
Copy Markdown
ContributorAuthor

@bors r- failed in rollup #91621 (comment)

Looking at this now.

Also:
- Review and edit current docs
- Enforce documentation for crate
Co-authored-by: r00ster <r00ster91@protonmail.com>
Co-authored-by: Camille Gillot <gillot.camille@gmail.com>
@pierwill
pierwillforce-pushed the edit-rustc-incremental-docs branch from fa054cf to 41f7692CompareDecember 7, 2021 16:11
@pierwill

Copy link
Copy Markdown
ContributorAuthor

This should be ready now. @matthiaskrgr

@pierwill

Copy link
Copy Markdown
ContributorAuthor

@rustbot ready

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 7, 2021
@cjgillot

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Dec 9, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit 41f7692 has been approved by cjgillot

@borsbors 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 Dec 9, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 9, 2021
…s, r=cjgillot
Document all public items in `rustc_incremental`
Also:
- Review and edit current docs
- Enforce documentation for the module.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 10, 2021
…s, r=cjgillot
Document all public items in `rustc_incremental`
Also:
- Review and edit current docs
- Enforce documentation for the module.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 10, 2021
…s, r=cjgillot
Document all public items in `rustc_incremental`
Also:
- Review and edit current docs
- Enforce documentation for the module.
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 10, 2021
…askrgr
Rollup of 10 pull requests
Successful merges:
- rust-lang#90407 (Document all public items in `rustc_incremental`)
- rust-lang#90897 (Fix incorrect stability attributes)
- rust-lang#91105 (Fix method name reference in stream documentation)
- rust-lang#91325 (adjust const_eval_select documentation)
- rust-lang#91470 (code-cov: generate dead functions with private/default linkage)
- rust-lang#91482 (Update documentation to use `from()` to initialize `HashMap`s and `BTreeMap`s)
- rust-lang#91524 (Fix Vec::extend_from_slice docs)
- rust-lang#91575 (Fix ICE on format string of macro with secondary-label)
- rust-lang#91625 (Remove redundant [..]s)
- rust-lang#91646 (Fix documentation for `core::ready::Ready`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 71c1d56 into rust-lang:masterDec 11, 2021
@rustbotrustbot added this to the 1.59.0 milestone Dec 11, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@pierwill@rust-highfive@bors@cjgillot@matthiaskrgr@bjorn3@apiraino@rustbot