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

Prevent <> links to be interpreted for intra-doc links #96187

Merged

Conversation

GuillaumeGomez
Copy link
Member

As discussed in this thread. As mentioned, the intra-doc RFC states that <> links shouldn't be potential intra-doc links: https://rust-lang.github.io/rfcs/1946-intra-rustdoc-links.html#no-autolinks-style.

I renamed markdown_links into potential_intra_doc_markdown_links to make it more obvious what it's doing.

cc @petrochenkov
r? @notriddle

@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Apr 18, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 18, 2022
@GuillaumeGomez
Copy link
Member Author

I don't think it should have a noticeable impact on perf but better check it:

@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 Apr 18, 2022
@bors
Copy link
Contributor

bors commented Apr 18, 2022

⌛ Trying commit 69bff8d9a6f729ec81d3e4284f17127d26e5655d with merge 60e35f84a244c676ef8161f5fc53872259f8dbb3...

@bors
Copy link
Contributor

bors commented Apr 18, 2022

☀️ Try build successful - checks-actions
Build commit: 60e35f84a244c676ef8161f5fc53872259f8dbb3 (60e35f84a244c676ef8161f5fc53872259f8dbb3)

@rust-timer
Copy link
Collaborator

Queued 60e35f84a244c676ef8161f5fc53872259f8dbb3 with parent 0516711, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (60e35f84a244c676ef8161f5fc53872259f8dbb3): comparison url.

Summary:

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 😿 relevant regressions found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 0 3 0 0 0
mean2 N/A 1.3% N/A N/A N/A
max N/A 1.4% N/A N/A N/A

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

Footnotes

  1. number of relevant changes

  2. the arithmetic mean of the percent change

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 18, 2022
@GuillaumeGomez
Copy link
Member Author

I didn't expect a regression that big...

@GuillaumeGomez GuillaumeGomez force-pushed the potential-intra-doc-links-filtering branch 2 times, most recently from 4222a13 to 1040c58 Compare April 18, 2022 22:11
@GuillaumeGomez
Copy link
Member Author

Let's try with the condition in the if let binding directly if it changes anything...

@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 Apr 18, 2022
@bors
Copy link
Contributor

bors commented Apr 18, 2022

⌛ Trying commit 1040c582189442b34dd910e3cf560844ae53c76f with merge fd6020410eb7165c95aa6aa41447d02ee8d48051...

@petrochenkov
Copy link
Contributor

I didn't expect a regression that big...

The regressions are not in rustdoc, looks like random fluctuations.

@bors
Copy link
Contributor

bors commented Apr 18, 2022

☀️ Try build successful - checks-actions
Build commit: fd6020410eb7165c95aa6aa41447d02ee8d48051 (fd6020410eb7165c95aa6aa41447d02ee8d48051)

@rust-timer
Copy link
Collaborator

Queued fd6020410eb7165c95aa6aa41447d02ee8d48051 with parent 8305398, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (fd6020410eb7165c95aa6aa41447d02ee8d48051): comparison url.

Summary:

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 😿 relevant regressions found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 0 2 0 0 0
mean2 N/A 1.2% N/A N/A N/A
max N/A 1.2% N/A N/A N/A

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf +perf-regression

Footnotes

  1. number of relevant changes

  2. the arithmetic mean of the percent change

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Apr 19, 2022
@GuillaumeGomez GuillaumeGomez removed the perf-regression Performance regression. label Apr 19, 2022
@GuillaumeGomez
Copy link
Member Author

No change. Well, let's go then...

@bors r=notriddle

@bors
Copy link
Contributor

bors commented Apr 19, 2022

📌 Commit 1040c582189442b34dd910e3cf560844ae53c76f has been approved by notriddle

@bors bors 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 Apr 19, 2022
/// This function returns the list of links that could be potentially intra-doc links.
///
/// To be noted, only `[]` links are included, `<>` links are always excluded.
crate fn potential_intra_doc_markdown_links(md: &str) -> Vec<MarkdownLink> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
crate fn potential_intra_doc_markdown_links(md: &str) -> Vec<MarkdownLink> {
crate fn intra_doc_markdown_links(md: &str) -> Vec<MarkdownLink> {

With #96135 preprocessing is done as a part of this function and all the returned links are indeed intra doc links.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll keep the kind pattern matching but I'll remove the other changes.

@bors
Copy link
Contributor

bors commented Apr 20, 2022

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

@bors bors 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 Apr 20, 2022
@GuillaumeGomez GuillaumeGomez force-pushed the potential-intra-doc-links-filtering branch from 1040c58 to 33aee10 Compare April 20, 2022 18:12
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez GuillaumeGomez force-pushed the potential-intra-doc-links-filtering branch from 33aee10 to f988f86 Compare April 20, 2022 18:28
@GuillaumeGomez
Copy link
Member Author

@bors r=notriddle

@bors
Copy link
Contributor

bors commented Apr 20, 2022

📌 Commit f988f86 has been approved by notriddle

@bors bors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 20, 2022
@bors
Copy link
Contributor

bors commented Apr 20, 2022

⌛ Testing commit f988f86 with merge 879aff3...

@bors
Copy link
Contributor

bors commented Apr 20, 2022

☀️ Test successful - checks-actions
Approved by: notriddle
Pushing 879aff3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 20, 2022
@bors bors merged commit 879aff3 into rust-lang:master Apr 20, 2022
@rustbot rustbot added this to the 1.62.0 milestone Apr 20, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (879aff3): comparison url.

Summary:

  • Primary benchmarks: 😿 relevant regression found
  • Secondary benchmarks: no relevant changes found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 1 0 0 0 1
mean2 1.7% N/A N/A N/A 1.7%
max 1.7% N/A N/A N/A 1.7%

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. number of relevant changes

  2. the arithmetic mean of the percent change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

8 participants