Skip to content
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

Resolve documentation links in rustc and store the results in metadata #94857

Merged
merged 3 commits into from
Feb 11, 2023

Conversation

petrochenkov
Copy link
Contributor

@petrochenkov petrochenkov commented Mar 11, 2022

This PR implements MCP rust-lang/compiler-team#584.

Doc links are now resolved in rustc and stored into metadata, so rustdoc simply retrieves them through a query (local or extern),

Code that is no longer used is removed, and some code that no longer needs to be public is privatized.
The removed code includes resolver cloning, so this PR fixes #83761.

@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Mar 11, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 11, 2022
@petrochenkov
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 11, 2022
@bors
Copy link
Contributor

bors commented Mar 11, 2022

⌛ Trying commit 2cf9c82db92b289f797a3639fa66646a7f7f7c59 with merge 4ba03cc378a00f3aa7982e3b28bf1be1ee8b5bb1...

@petrochenkov petrochenkov removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 11, 2022
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors

This comment was marked as resolved.

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 11, 2022
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

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

This is awesome ❤️ thank you so much for pushing this through.

compiler/rustc_resolve/src/lib.rs Outdated Show resolved Hide resolved
src/librustdoc/core.rs Outdated Show resolved Hide resolved
src/librustdoc/passes/collect_intra_doc_links/early.rs Outdated Show resolved Hide resolved
src/librustdoc/passes/collect_intra_doc_links/early.rs Outdated Show resolved Hide resolved
src/librustdoc/passes/collect_intra_doc_links/early.rs Outdated Show resolved Hide resolved
src/test/rustdoc-ui/intra-doc/ambiguity.stderr Outdated Show resolved Hide resolved
@petrochenkov
Copy link
Contributor Author

@jyn514
This is far from being ready for review, I posted the PR in hope to get some upper limit on performance regressions.
So the answer to all of the review comments so far is "what did you expected from an in progress work".

@petrochenkov petrochenkov removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 11, 2022
@bors

This comment was marked as resolved.

@rust-log-analyzer

This comment was marked as resolved.

@petrochenkov
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 18, 2022
@bors
Copy link
Contributor

bors commented Mar 18, 2022

⌛ Trying commit a212f3f85fc2474fce8a7c6cf94f577a9a3cf558 with merge aa6d1b03317847cb190fc37c0d4674bf18f3a192...

@rust-log-analyzer

This comment has been minimized.

@bors

This comment was marked as resolved.

@bors
Copy link
Contributor

bors commented Feb 11, 2023

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 5b45024 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 11, 2023
@bors bors merged commit 5b45024 into rust-lang:master Feb 11, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 11, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5b45024): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.6% [0.3%, 1.5%] 28
Regressions ❌
(secondary)
0.3% [0.3%, 0.3%] 1
Improvements ✅
(primary)
-2.4% [-5.7%, -0.6%] 17
Improvements ✅
(secondary)
-3.4% [-5.2%, -0.6%] 21
All ❌✅ (primary) -0.6% [-5.7%, 1.5%] 45

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.7% [1.2%, 4.2%] 3
Improvements ✅
(primary)
-4.5% [-7.9%, -1.9%] 15
Improvements ✅
(secondary)
-2.6% [-8.1%, -1.3%] 20
All ❌✅ (primary) -4.5% [-7.9%, -1.9%] 15

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.0% [2.0%, 2.0%] 1
Regressions ❌
(secondary)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
-3.0% [-4.9%, -1.8%] 10
Improvements ✅
(secondary)
-3.7% [-4.7%, -1.7%] 17
All ❌✅ (primary) -2.6% [-4.9%, 2.0%] 11

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 12, 2023
rustdoc: Remove cache for preprocessed markdown links

It's quite possible that it's no longer useful after rust-lang#94857 is merged.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 13, 2023
…Simulacrum

Print disk usage in PGO CI script

To diagnose issues like rust-lang#94857 (comment).
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 14, 2023
rustc/rustdoc: Perform name resolver cleanups enabled by rust-lang#94857

Unblocks rust-lang#105462.
r? `@oli-obk`
@rylev
Copy link
Member

rylev commented Feb 14, 2023

Going to label this as perf triaged based on the analysis here.

@rustbot label: perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Feb 14, 2023
adrianheine added a commit to adrianheine/rust that referenced this pull request Mar 10, 2023
adrianheine added a commit to adrianheine/rust that referenced this pull request Mar 10, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 11, 2023
… r=petrochenkov

rustdoc: Don't crash on `crate` references in blocks

This is a regression from rust-lang#94857.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 11, 2023
… r=petrochenkov

rustdoc: Don't crash on `crate` references in blocks

This is a regression from rust-lang#94857.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc: Stop cloning the resolver