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

stabilize lint handling in rustdoc #52354

Merged
merged 1 commit into from Jul 20, 2018

Conversation

Projects
None yet
8 participants
@QuietMisdreavus
Member

QuietMisdreavus commented Jul 13, 2018

When #51732 added CLI flags to manipulate lints in rustdoc, they were added as unstable flags. This made sense as they were new additions, but since they mirrored the flags that rustc has, it's worth considering them to not need an unstable period.

Stabilizing them also provides the opportunity for a critical fix: allowing Cargo to pass --cap-lints allow when documenting dependencies, the same as when it compiles them.

r? @rust-lang/rustdoc

@QuietMisdreavus

This comment has been minimized.

Show comment
Hide comment
@QuietMisdreavus
Member

QuietMisdreavus commented Jul 13, 2018

@rfcbot merge

@rfcbot

This comment has been minimized.

Show comment
Hide comment
@rfcbot

rfcbot Jul 13, 2018

Team member @QuietMisdreavus has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

rfcbot commented Jul 13, 2018

Team member @QuietMisdreavus has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Jul 14, 2018

Member

This is not exactly mirrored from rustc, far from that. But if you're ok, then I have no problem stabilizing it. :)

Member

GuillaumeGomez commented Jul 14, 2018

This is not exactly mirrored from rustc, far from that. But if you're ok, then I have no problem stabilizing it. :)

@QuietMisdreavus

This comment has been minimized.

Show comment
Hide comment
@QuietMisdreavus

QuietMisdreavus Jul 14, 2018

Member

What makes it different from rustc? The flags themselves are the same, are they not?

Member

QuietMisdreavus commented Jul 14, 2018

What makes it different from rustc? The flags themselves are the same, are they not?

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Jul 15, 2018

Member

The flags are the same, the code behind isn't at all. In rustdoc, we have an extra handling for lints we don't have for rustc. By default, all lints are disabled, but it changes if you use one of those flags (for this lint only though).

Member

GuillaumeGomez commented Jul 15, 2018

The flags are the same, the code behind isn't at all. In rustdoc, we have an extra handling for lints we don't have for rustc. By default, all lints are disabled, but it changes if you use one of those flags (for this lint only though).

@kennytm kennytm added the relnotes label Jul 15, 2018

@ehuss ehuss referenced this pull request Jul 15, 2018

Open

[WIP] Configure lints in Cargo.toml #5728

3 of 6 tasks complete

@kennytm kennytm referenced this pull request Jul 19, 2018

Closed

Documentation does not build on Rust 1.29.0 #1792

1 of 2 tasks complete
@rfcbot

This comment has been minimized.

Show comment
Hide comment
@rfcbot

rfcbot Jul 19, 2018

🔔 This is now entering its final comment period, as per the review above. 🔔

rfcbot commented Jul 19, 2018

🔔 This is now entering its final comment period, as per the review above. 🔔

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez
Member

GuillaumeGomez commented Jul 19, 2018

@bors: r+

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Jul 19, 2018

Contributor

📌 Commit 8f1ebbc has been approved by GuillaumeGomez

Contributor

bors commented Jul 19, 2018

📌 Commit 8f1ebbc has been approved by GuillaumeGomez

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Jul 20, 2018

Contributor

⌛️ Testing commit 8f1ebbc with merge 113cbd2...

Contributor

bors commented Jul 20, 2018

⌛️ Testing commit 8f1ebbc with merge 113cbd2...

bors added a commit that referenced this pull request Jul 20, 2018

Auto merge of #52354 - QuietMisdreavus:rustdoc-lints, r=GuillaumeGomez
stabilize lint handling in rustdoc

When #51732 added CLI flags to manipulate lints in rustdoc, they were added as unstable flags. This made sense as they were new additions, but since they mirrored the flags that rustc has, it's worth considering them to not need an unstable period.

Stabilizing them also provides the opportunity for a critical fix: allowing Cargo to pass `--cap-lints allow` when documenting dependencies, the same as when it compiles them.

r? @rust-lang/rustdoc
@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Jul 20, 2018

Contributor

💔 Test failed - status-travis

Contributor

bors commented Jul 20, 2018

💔 Test failed - status-travis

@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive Jul 20, 2018

Collaborator

The job x86_64-gnu-aux of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[01:33:17] [TIMING] ToolBuild { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu", tool: "cargotest", path: "src/tools/cargotest", mode: ToolBootstrap, is_ext_tool: false, extra_features: [] } -- 1.323
[01:33:17] testing https://github.com/servo/webrender
[01:33:17] Initialized empty Git repository in /checkout/obj/build/ct/webrender/.git/
[01:33:17] fatal: Could not parse object '57250b2b8fa63934f80e5376a29f7dcb3f759ad6'.
[01:34:13] fatal: unable to access 'https://github.com/servo/webrender/': Could not resolve host: github.com
[01:34:13] thread 'main' panicked at 'assertion failed: status.success()', tools/cargotest/main.rs:128:13
[01:34:13] 
[01:34:13] 
[01:34:13] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/cargotest" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "/checkout/obj/build/ct"
[01:34:13] expected success, got: exit code: 101
[01:34:13] expected success, got: exit code: 101
[01:34:13] 
[01:34:13] 
[01:34:13] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/test/pretty src/test/run-pass/pretty src/test/run-fail/pretty src/test/run-pass-valgrind/pretty src/test/run-pass-fulldeps/pretty src/test/run-fail-fulldeps/pretty src/tools/cargo src/tools/cargotest
[01:34:13] Build completed unsuccessfully in 0:36:45
[01:34:13] make: *** [check-aux] Error 1
[01:34:13] Makefile:60: recipe for target 'check-aux' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:29341810
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:13d6329e:start=1532068737457467269,finish=1532068737464644466,duration=7177197
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0245d078
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1197744e
travis_time:start:1197744e
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0229a188
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

Collaborator

rust-highfive commented Jul 20, 2018

The job x86_64-gnu-aux of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[01:33:17] [TIMING] ToolBuild { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu", tool: "cargotest", path: "src/tools/cargotest", mode: ToolBootstrap, is_ext_tool: false, extra_features: [] } -- 1.323
[01:33:17] testing https://github.com/servo/webrender
[01:33:17] Initialized empty Git repository in /checkout/obj/build/ct/webrender/.git/
[01:33:17] fatal: Could not parse object '57250b2b8fa63934f80e5376a29f7dcb3f759ad6'.
[01:34:13] fatal: unable to access 'https://github.com/servo/webrender/': Could not resolve host: github.com
[01:34:13] thread 'main' panicked at 'assertion failed: status.success()', tools/cargotest/main.rs:128:13
[01:34:13] 
[01:34:13] 
[01:34:13] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/cargotest" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "/checkout/obj/build/ct"
[01:34:13] expected success, got: exit code: 101
[01:34:13] expected success, got: exit code: 101
[01:34:13] 
[01:34:13] 
[01:34:13] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/test/pretty src/test/run-pass/pretty src/test/run-fail/pretty src/test/run-pass-valgrind/pretty src/test/run-pass-fulldeps/pretty src/test/run-fail-fulldeps/pretty src/tools/cargo src/tools/cargotest
[01:34:13] Build completed unsuccessfully in 0:36:45
[01:34:13] make: *** [check-aux] Error 1
[01:34:13] Makefile:60: recipe for target 'check-aux' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:29341810
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:13d6329e:start=1532068737457467269,finish=1532068737464644466,duration=7177197
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0245d078
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1197744e
travis_time:start:1197744e
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0229a188
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@pietroalbini

This comment has been minimized.

Show comment
Hide comment
@pietroalbini
Member

pietroalbini commented Jul 20, 2018

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Jul 20, 2018

Contributor

⌛️ Testing commit 8f1ebbc with merge 878dd0b...

Contributor

bors commented Jul 20, 2018

⌛️ Testing commit 8f1ebbc with merge 878dd0b...

bors added a commit that referenced this pull request Jul 20, 2018

Auto merge of #52354 - QuietMisdreavus:rustdoc-lints, r=GuillaumeGomez
stabilize lint handling in rustdoc

When #51732 added CLI flags to manipulate lints in rustdoc, they were added as unstable flags. This made sense as they were new additions, but since they mirrored the flags that rustc has, it's worth considering them to not need an unstable period.

Stabilizing them also provides the opportunity for a critical fix: allowing Cargo to pass `--cap-lints allow` when documenting dependencies, the same as when it compiles them.

r? @rust-lang/rustdoc
@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Jul 20, 2018

Contributor

☀️ Test successful - status-appveyor, status-travis
Approved by: GuillaumeGomez
Pushing 878dd0b to master...

Contributor

bors commented Jul 20, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: GuillaumeGomez
Pushing 878dd0b to master...

@bors bors merged commit 8f1ebbc into rust-lang:master Jul 20, 2018

2 checks passed

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

@QuietMisdreavus QuietMisdreavus deleted the QuietMisdreavus:rustdoc-lints branch Jul 20, 2018

@ollie27

This comment has been minimized.

Show comment
Hide comment
@ollie27

ollie27 Jul 21, 2018

Contributor

Where are the tests for these command line arguments?

Contributor

ollie27 commented Jul 21, 2018

Where are the tests for these command line arguments?

bors added a commit that referenced this pull request Jul 28, 2018

Auto merge of #52796 - ollie27:rustdoc_beta_lints, r=QuietMisdreavus
[beta] Disable lints in rustdoc

The lint handling in rustdoc 1.28 is still incomplete so I think it would be best to disable it for the stable release. The main thing that's missing is that cargo doesn't cap lints for dependencies. This was fixed in master by #52354 and rust-lang/cargo#5765 but they haven't been backported. Additionally rustdoc is still emitting lints that are not on its whitelist #51661 (comment).

cc. @rust-lang/rustdoc

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Sep 14, 2018

rust: Update to 1.29.0.
Version 1.29.0 (2018-09-13)
==========================

Compiler
--------
- [Bumped minimum LLVM version to 5.0.][51899]
- [Added `powerpc64le-unknown-linux-musl` target.][51619]
- [Added `aarch64-unknown-hermit` and `x86_64-unknown-hermit` targets.][52861]

Libraries
---------
- [`Once::call_once` now no longer requires `Once` to be `'static`.][52239]
- [`BuildHasherDefault` now implements `PartialEq` and `Eq`.][52402]
- [`Box<CStr>`, `Box<OsStr>`, and `Box<Path>` now implement `Clone`.][51912]
- [Implemented `PartialEq<&str>` for `OsString` and `PartialEq<OsString>`
  for `&str`.][51178]
- [`Cell<T>` now allows `T` to be unsized.][50494]
- [`SocketAddr` is now stable on Redox.][52656]

Stabilized APIs
---------------
- [`Arc::downcast`]
- [`Iterator::flatten`]
- [`Rc::downcast`]

Cargo
-----
- [Cargo can silently fix some bad lockfiles ][cargo/5831] You can use
  `--locked` to disable this behaviour.
- [`cargo-install` will now allow you to cross compile an install
  using `--target`][cargo/5614]
- [Added the `cargo-fix` subcommand to automatically move project code from
  2015 edition to 2018.][cargo/5723]

Misc
----
- [`rustdoc` now has the `--cap-lints` option which demotes all lints above
  the specified level to that level.][52354] For example `--cap-lints warn`
  will demote `deny` and `forbid` lints to `warn`.
- [`rustc` and `rustdoc` will now have the exit code of `1` if compilation
  fails, and `101` if there is a panic.][52197]
- [A preview of clippy has been made available through rustup.][51122]
  You can install the preview with `rustup component add clippy-preview`

Compatibility Notes
-------------------
- [`str::{slice_unchecked, slice_unchecked_mut}` are now deprecated.][51807]
  Use `str::get_unchecked(begin..end)` instead.
- [`std::env::home_dir` is now deprecated for its unintuitive behaviour.][51656]
  Consider using the `home_dir` function from
  https://crates.io/crates/dirs instead.
- [`rustc` will no longer silently ignore invalid data in target spec.][52330]

[52861]: rust-lang/rust#52861
[52656]: rust-lang/rust#52656
[52239]: rust-lang/rust#52239
[52330]: rust-lang/rust#52330
[52354]: rust-lang/rust#52354
[52402]: rust-lang/rust#52402
[52103]: rust-lang/rust#52103
[52197]: rust-lang/rust#52197
[51807]: rust-lang/rust#51807
[51899]: rust-lang/rust#51899
[51912]: rust-lang/rust#51912
[51511]: rust-lang/rust#51511
[51619]: rust-lang/rust#51619
[51656]: rust-lang/rust#51656
[51178]: rust-lang/rust#51178
[51122]: rust-lang/rust#51122
[50494]: rust-lang/rust#50494
[cargo/5614]: rust-lang/cargo#5614
[cargo/5723]: rust-lang/cargo#5723
[cargo/5831]: rust-lang/cargo#5831
[`Arc::downcast`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.downcast
[`Iterator::flatten`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.flatten
[`Rc::downcast`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.downcast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment