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

Rename rustdoc to rustdoc::all #82798

Merged
merged 1 commit into from
Mar 14, 2021
Merged

Rename rustdoc to rustdoc::all #82798

merged 1 commit into from
Mar 14, 2021

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Mar 5, 2021

When rustdoc lints were changed to be tool lints, the rustdoc group was removed, leading to spurious warnings like

warning: unknown lint: `rustdoc`

The lint group still worked when rustdoc ran, since rustdoc added the group itself.

This renames the group to rustdoc::all for consistency with clippy::all and the rest of the rustdoc lints.

Follow-up to #80527.
r? @Manishearth

@jyn514 jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. labels Mar 5, 2021
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 5, 2021
@jyn514
Copy link
Member Author

jyn514 commented Mar 5, 2021

Oh, let me add a test for this.

@jyn514
Copy link
Member Author

jyn514 commented Mar 5, 2021

The error is

thread 'rustc' panicked at 'compiler/rustc_lint/src/context.rs:265:13: duplicate specification of lint group rustdoc', /checkout/library/std/src/panic.rs:59:5

I can either

  • Special case rustc_lint to look at sess.opts.actually_rustdoc, and not add the group if so, or
  • Rename the lint to rustdoc::all, which is a user-facing change.

@Manishearth which do you prefer?

@Manishearth
Copy link
Member

I would rename the group to rustdoc::all and deprecate (but keep around) the old group name.

@Manishearth
Copy link
Member

Manishearth commented Mar 5, 2021

Actually I'm in favor of immediately setting the old lint group to empty, and having a special unknown_lints (or different lint) warning asking people to rename it to rustdoc::all.

Clippy regularly does this with lints. We keep around old lint names indefinitely, but we empty them and have a warning for deprecated ones.

@jyn514
Copy link
Member Author

jyn514 commented Mar 5, 2021

Actually I'm in favor of immediately setting the old lint group to empty, and having a special unknown_lints (or different lint) warning asking people to rename it to rustdoc::all.

What's the difference between this and deprecating the old name?

When rustdoc lints were changed to be tool lints, the `rustdoc` group
was removed, leading to spurious warnings like

```
warning: unknown lint: `rustdoc`
```

The lint group still worked when rustdoc ran, since rustdoc added the group itself.

This renames the group to `rustdoc::all` for consistency with
`clippy::all` and the rest of the rustdoc lints.
@Manishearth
Copy link
Member

What's the difference between this and deprecating the old name?

Instead of deprecating we make it stop working immediately (but there's a warning as a breadcrumb).

No strong opinion in either direction.

@jyn514
Copy link
Member Author

jyn514 commented Mar 5, 2021

I think we should keep deny(rustdoc) working and just warn that you should use the new name, there's no reason not to and it keeps it consistent with the rest of the lint renames. I've implemented that.

@jyn514 jyn514 changed the title Don't warn on deny(rustdoc) Rename rustdoc to rustdoc::all Mar 5, 2021
@GuillaumeGomez
Copy link
Member

I think we should keep deny(rustdoc) working and just warn that you should use the new name, there's no reason not to and it keeps it consistent with the rest of the lint renames. I've implemented that.

Agreed!

@jyn514
Copy link
Member Author

jyn514 commented Mar 13, 2021

@Manishearth is this waiting on review or on a team consensus? I'm not sure.

@Manishearth
Copy link
Member

Unsure, I'm +1 on it

@jyn514
Copy link
Member Author

jyn514 commented Mar 13, 2021

@bors r=Manishearth,GuillaumeGomez

@bors
Copy link
Contributor

bors commented Mar 13, 2021

📌 Commit 45229b0 has been approved by Manishearth,GuillaumeGomez

@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 Mar 13, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Mar 13, 2021
…,GuillaumeGomez

Rename `rustdoc` to `rustdoc::all`

When rustdoc lints were changed to be tool lints, the `rustdoc` group was removed, leading to spurious warnings like

```
warning: unknown lint: `rustdoc`
```

The lint group still worked when rustdoc ran, since rustdoc added the group itself.

This renames the group to `rustdoc::all` for consistency with `clippy::all` and the rest of the rustdoc lints.

Follow-up to rust-lang#80527.
r? `@Manishearth`
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 14, 2021
Rollup of 10 pull requests

Successful merges:

 - rust-lang#81465 (Add documentation about formatting `Duration` values)
 - rust-lang#82121 (Implement Extend and FromIterator for OsString)
 - rust-lang#82617 (Document `everybody_loops`)
 - rust-lang#82789 (Get with field index from pattern slice instead of directly indexing)
 - rust-lang#82798 (Rename `rustdoc` to `rustdoc::all`)
 - rust-lang#82804 (std: Fix a bug on the wasm32-wasi target opening files)
 - rust-lang#82943 (Demonstrate best practice for feeding stdin of a child processes)
 - rust-lang#83066 (Add `reverse` search alias for Iterator::rev())
 - rust-lang#83070 (Update cargo)
 - rust-lang#83081 (Fix panic message of `assert_failed_inner`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3361402 into rust-lang:master Mar 14, 2021
@rustbot rustbot added this to the 1.52.0 milestone Mar 14, 2021
@jyn514 jyn514 deleted the rustdoc-group branch March 14, 2021 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. 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.

6 participants