Skip to content

Deprecate several flags in rustdoc - #44138

Merged
alexcrichton merged 3 commits into
rust-lang:masterfrom
steveklabnik:rustdoc-deprecations
Oct 18, 2017
Merged

Deprecate several flags in rustdoc#44138
alexcrichton merged 3 commits into
rust-lang:masterfrom
steveklabnik:rustdoc-deprecations

Conversation

@steveklabnik

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

r? @GuillaumeGomez

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

@ManishearthManishearth left a comment

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.

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

Comment threadsrc/librustdoc/lib.rs Outdated

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.

Nl at eof

@steveklabnik

Copy link
Copy Markdown
ContributorAuthor

Probs should use the colorful one

What's "the colorful one"?

@Manishearth

Copy link
Copy Markdown
Member

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

@GuillaumeGomez

Copy link
Copy Markdown
Member

@bors: r=Manishearth

@bors

bors commented Aug 29, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 4cd5314 has been approved by Manishearth

@frewsxcv

Copy link
Copy Markdown
Contributor

@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...
@frewsxcvfrewsxcv mentioned this pull request Aug 29, 2017
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...
@frewsxcvfrewsxcv mentioned this pull request Aug 29, 2017
@frewsxcv

Copy link
Copy Markdown
Contributor

@arielb1arielb1 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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
Member

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

@steveklabnik

Copy link
Copy Markdown
ContributorAuthor
> 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
Copy Markdown
ContributorAuthor

@alexcrichtonhttps://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
Copy Markdown
Member

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

@QuietMisdreavus

Copy link
Copy Markdown
Contributor

I'm also remembering #43949 (comment) where it didn't work for dev-tools in the past. >_>

@steveklabnik

steveklabnik commented Sep 21, 2017

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
Contributor

LGTM

@klabnikatron reviewed

@alexcrichton

Copy link
Copy Markdown
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 :)

@alexcrichtonalexcrichton added S-waiting-on-team 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
Copy Markdown
Member

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

@kennytm

Copy link
Copy Markdown
Member

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

@kennytmkennytm 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 labels Oct 15, 2017
@steveklabnik

Copy link
Copy Markdown
ContributorAuthor

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

@steveklabnik

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
Contributor

*drumroll*

:shipit:

@bors r+

@bors

bors commented Oct 17, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 045ce18 has been approved by QuietMisdreavus

@kennytmkennytm 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...
@kennytmkennytm mentioned this pull request Oct 18, 2017
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:masterOct 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)]`
Closesrust-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 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-dev-toolsRelevant 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.

14 participants

@steveklabnik@rust-highfive@Manishearth@GuillaumeGomez@bors@frewsxcv@alexcrichton@carols10cents@kennytm@QuietMisdreavus@killercup@michaelwoerister@aidanhs@arielb1