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

Deprecate several flags in rustdoc #44138

Merged
merged 3 commits into from
Oct 18, 2017

Conversation

steveklabnik
Copy link
Member

Part of #44136

cc @rust-lang/dev-tools @rust-lang/docs

This is a very basic PR to start deprecating some flags; rustdoc doesn't really have fancy output options like rustc does, so I went with eprintln!. Happy to change it if people feel that's not appropriate.

Also, I have no idea if we can or should write tests here, so I didn't try. If someone feels strongly about it, then let's do it, but given that the only outcome here is a side effect...

@rust-highfive
Copy link
Collaborator

r? @GuillaumeGomez

(rust_highfive has picked a reviewer for you, use r? to override)

Copy link
Member

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

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

r=me. Probs should use the colorful one over eprintln

matches.opt_present("passes") {
eprintln!("WARNING: this flag is considered deprecated, please see https://github.com/rust-lang/rust/issues/44136")
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Nl at eof

@steveklabnik
Copy link
Member Author

Probs should use the colorful one

What's "the colorful one"?

@Manishearth
Copy link
Member

nvm, that's only available from within rustc and nontrivial to use without a Session

@GuillaumeGomez
Copy link
Member

@bors: r=Manishearth

@bors
Copy link
Contributor

bors commented Aug 29, 2017

📌 Commit 4cd5314 has been approved by Manishearth

@frewsxcv
Copy link
Member

@bors rollup

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Aug 29, 2017
…r=Manishearth

Deprecate several flags in rustdoc

Part of rust-lang#44136

cc @rust-lang/dev-tools @rust-lang/docs

This is a very basic PR to start deprecating some flags; `rustdoc` doesn't really have fancy output options like `rustc` does, so I went with `eprintln!`. Happy to change it if people feel that's not appropriate.

Also, I have no idea if we can or should write tests here, so I didn't try. If someone feels strongly about it, then let's do it, but given that the only outcome here is a side effect...
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Aug 29, 2017
…r=Manishearth

Deprecate several flags in rustdoc

Part of rust-lang#44136

cc @rust-lang/dev-tools @rust-lang/docs

This is a very basic PR to start deprecating some flags; `rustdoc` doesn't really have fancy output options like `rustc` does, so I went with `eprintln!`. Happy to change it if people feel that's not appropriate.

Also, I have no idea if we can or should write tests here, so I didn't try. If someone feels strongly about it, then let's do it, but given that the only outcome here is a side effect...
@frewsxcv
Copy link
Member

@arielb1 arielb1 added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 29, 2017
@alexcrichton
Copy link
Member

Hm right now this just prints out "WARNING: this flag is considered deprecated", could it also print the flag as well?

steveklabnik added a commit to steveklabnik/cargo that referenced this pull request Aug 30, 2017
In rust-lang/rust#44138 we are adding deprecations, and so it
breaks these tests.
bors added a commit to rust-lang/cargo that referenced this pull request Aug 30, 2017
relax rustdoc tests

This was asserting on the output directly, rather than just what it contains.

In rust-lang/rust#44138 we are adding deprecations, and so it
breaks these tests.
@steveklabnik
Copy link
Member Author

Great, so this works with my Cargo PR.

@alexcrichton , what's the process for updating Cargo these days? It looks like it depends on a released version, I'm not sure what the protocol is for that.

Hm right now this just prints out "WARNING: this flag is considered deprecated", could it also print the flag as well?

Also happy to do that as well, alongside dropping the testing changes to the submodules.

@alexcrichton
Copy link
Member

Oh you can just update the cargo submodule whenever on the master branch of rust, no worries!

@steveklabnik
Copy link
Member Author

> rustdoc +local --no-defaults
WARNING: the 'no-defaults' flag is considered deprecated
WARNING: please see https://github.com/rust-lang/rust/issues/44136

🤘

@steveklabnik
Copy link
Member Author

@alexcrichton https://travis-ci.org/rust-lang/rust/jobs/270119195#L772

what's the right way to resolve this? change it to 0.23?

@alexcrichton
Copy link
Member

Probably rebase on top of #44154 and wait for that to land I think?

@steveklabnik
Copy link
Member Author

steveklabnik commented Sep 21, 2017

Okay well, sorry rfcbot i'm done fighting with you :)

ping the @rust-lang/dev-tools team for signoffs; here's some manual ticky boxes for you:

Primary sign-off here is "--document-private-items as the name of the flag for rustdoc to document private items". I'm open to suggestions.

@killercup
Copy link
Member

LGTM

@klabnikatron reviewed

@alexcrichton
Copy link
Member

@steveklabnik loos like the last remaining box here is @nrc whom I believe is on parental leave right now, although I doubt he'd object to this :)

@alexcrichton alexcrichton added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 28, 2017
@michaelwoerister
Copy link
Member

We looked at this during dev-tools triage. As @alexcrichton says, I think this is good to go, @steveklabnik!

@kennytm
Copy link
Member

kennytm commented Oct 15, 2017

Ping again @steveklabnik 🙂. I think the teams' decisions are "it is good to go". The remaining item is to get it tested, right?

@kennytm kennytm 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-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Oct 15, 2017
@steveklabnik
Copy link
Member Author

Sorry for the delay here, will get on this tomorrow!

@steveklabnik
Copy link
Member Author

Okay; we don't have a great way to test the output here, but on @QuietMisdreavus 's suggestion, I've changed a few of the rustdoc tests to use the new flag. That gives us about as much coverage as the old flags did.

@QuietMisdreavus
Copy link
Member

*drumroll*

:shipit:

@bors r+

@bors
Copy link
Contributor

bors commented Oct 17, 2017

📌 Commit 045ce18 has been approved by QuietMisdreavus

@kennytm kennytm 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 Oct 18, 2017
kennytm added a commit to kennytm/rust that referenced this pull request Oct 18, 2017
…r=QuietMisdreavus

Deprecate several flags in rustdoc

Part of rust-lang#44136

cc @rust-lang/dev-tools @rust-lang/docs

This is a very basic PR to start deprecating some flags; `rustdoc` doesn't really have fancy output options like `rustc` does, so I went with `eprintln!`. Happy to change it if people feel that's not appropriate.

Also, I have no idea if we can or should write tests here, so I didn't try. If someone feels strongly about it, then let's do it, but given that the only outcome here is a side effect...
bors added a commit that referenced this pull request Oct 18, 2017
Rollup of 10 pull requests

- Successful merges: #44138, #45082, #45098, #45181, #45217, #45281, #45325, #45326, #45340, #45354
- Failed merges:
@alexcrichton alexcrichton merged commit 045ce18 into rust-lang:master Oct 18, 2017
@steveklabnik steveklabnik deleted the rustdoc-deprecations branch October 25, 2017 18:29
kennytm added a commit to kennytm/rust that referenced this pull request May 16, 2018
…=GuillaumeGomez

rustdoc: deprecate `#![doc(passes, plugins, no_default_passes)]`

Closes rust-lang#48164

Blocked on rust-lang#50541 - this includes those changes, which were necessary to create the UI test

cc rust-lang#44136

Turns out, there were special attributes to mess with rustdoc passes and plugins! Who knew! Since we deprecated the CLI flags for this functionality, it makes sense that we do the same for the attributes.

This PR also introduces a `#![doc(document_private_items)]` attribute, to match the `--document-private-items` flag introduced in rust-lang#44138 when the passes/plugins flags were deprecated.

I haven't done a search to see whether these attributes are being used at all, but if the flags were any indication, i don't expect to see any users of these.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.