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

librustdoc: set cap-lints=allow when compiling documentation #29529

Merged
merged 1 commit into from Nov 3, 2015

Conversation

Projects
None yet
6 participants
@Ryman
Copy link
Contributor

Ryman commented Nov 2, 2015

This sets the cap-lints setting to 'allow' for all doc compilations. There's precedent for this as rustdoc already whitelists unstable code when compiling documentation, with the expectation being that a regular compile will complain about any problems. I think the same justification applies here.

Problem case in the wild: laumann/compiletest-rs#28

r? @Manishearth

@Manishearth

This comment has been minimized.

Copy link
Member

Manishearth commented Nov 3, 2015

r? @alexcrichton

Not entirely familiar with the complete reasoning behind capping ar Allow, deferring to Alex.

@huonw

This comment has been minimized.

@Manishearth

This comment has been minimized.

Copy link
Member

Manishearth commented Nov 3, 2015

I meant the unstable features stuff. I'm not sure if we should be capping at allow or warn here, and I'm not sure if this should even be a part of rustdoc (not cargo).

Happy with the code changes, though, r=me if nobody has an issue with allow over warn and it being in rustdoc.

@steveklabnik

This comment has been minimized.

Copy link
Member

steveklabnik commented Nov 3, 2015

So, one thing is that when docs run without lints, we get into situations like #29523 . I would have loved to have seen a "hey, this feature isn't needed" warning, so that we wouldn't have had the bug.

@Manishearth

This comment has been minimized.

Copy link
Member

Manishearth commented Nov 3, 2015

So I guess we want to cap in docs but not doctests?

@Ryman

This comment has been minimized.

Copy link
Contributor Author

Ryman commented Nov 3, 2015

@steveklabnik This change only applies to running rustdoc on rust files without the test flag, there's three more codepaths: testing rust files, compiling markdown files, testing markdown files. 😅

Just confirmed that make-check-docs still fires warnings from tests in rust files.

@steveklabnik

This comment has been minimized.

Copy link
Member

steveklabnik commented Nov 3, 2015

@Ryman ah! ignore my objection then, sorry :)

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Nov 3, 2015

@steveklabnik oh we actually have support for that, it's just not turned on by default.

I also think that this is fine, seems kinda odd for a documentation generator to be warning you about various parts of your code! Thanks @Ryman!

@bors: r+ b1ef530

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 3, 2015

⌛️ Testing commit b1ef530 with merge de11d2a...

bors added a commit that referenced this pull request Nov 3, 2015

Auto merge of #29529 - Ryman:rustdoc-cap-lints, r=alexcrichton
This sets the `cap-lints` setting to 'allow' for all doc compilations. There's precedent for this as rustdoc [already whitelists unstable code](https://github.com/rust-lang/rust/blob/master/src/librustdoc/core.rs#L112) when compiling documentation, with the expectation being that a regular compile will complain about any problems. I think the same justification applies here.

Problem case in the wild: laumann/compiletest-rs#28

r? @Manishearth

@bors bors merged commit b1ef530 into rust-lang:master Nov 3, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

arcnmx added a commit to arcnmx/rust that referenced this pull request Nov 4, 2015

Auto merge of rust-lang#29529 - Ryman:rustdoc-cap-lints, r=alexcrichton
This sets the `cap-lints` setting to 'allow' for all doc compilations. There's precedent for this as rustdoc [already whitelists unstable code](https://github.com/rust-lang/rust/blob/master/src/librustdoc/core.rs#L112) when compiling documentation, with the expectation being that a regular compile will complain about any problems. I think the same justification applies here.

Problem case in the wild: laumann/compiletest-rs#28

r? @Manishearth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.