Skip to content

Inject clippy into the rls again #52172

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

Merged
merged 4 commits into from
Jul 11, 2018
Merged

Inject clippy into the rls again #52172

merged 4 commits into from
Jul 11, 2018

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jul 9, 2018

Also makes sure we actually point to the local rustfmt

r? @nrc

cc @Manishearth

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 9, 2018
Also makes sure we actually point to the local rls
Copy link
Member

@nrc nrc left a comment

Choose a reason for hiding this comment

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

\o/

extra_features: Vec::new(),
});
let channel = &builder.config.channel;
if clippy.is_some() && channel != "stable" && channel != "beta" {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need the channel checks here. This will ride the trains to beta and stable and should include this. And this won't affect how stable and beta are currently built.

@@ -1221,7 +1221,7 @@ impl Step for Clippy {
let tmp = tmpdir(builder);
Copy link
Member

Choose a reason for hiding this comment

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

Does this also need changes to build-manifest? I think it doesn't because there is still just the clippy component which installs both clippy and cargo clippy - is that correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea, this is mirroring the rustfmt + cargo-fmt code. I should probably deduplicate that someday

@oli-obk
Copy link
Contributor Author

oli-obk commented Jul 11, 2018

Addressed review comments

@nrc
Copy link
Member

nrc commented Jul 11, 2018

@bors: r+

@bors
Copy link
Collaborator

bors commented Jul 11, 2018

📌 Commit 0fc61be has been approved by nrc

@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 Jul 11, 2018
@Mark-Simulacrum
Copy link
Member

@bors p=1 -- edition-related, want to get this landed so we can commence proper experimentation

@Centril Centril added this to the Rust 2018 Preview 2 milestone Jul 11, 2018
@bors
Copy link
Collaborator

bors commented Jul 11, 2018

⌛ Testing commit 0fc61be with merge 4ba5ff4...

bors added a commit that referenced this pull request Jul 11, 2018
Inject clippy into the rls again

Also makes sure we actually point to the local rustfmt

r? @nrc

cc @Manishearth
@bors
Copy link
Collaborator

bors commented Jul 11, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: nrc
Pushing 4ba5ff4 to master...

@bors bors merged commit 0fc61be into rust-lang:master Jul 11, 2018
@rust-highfive
Copy link
Contributor

📣 Toolstate changed by #52172!

Tested on commit 4ba5ff4.
Direct link to PR: #52172

💔 rls on windows: test-pass → build-fail (cc @nrc, @rust-lang/infra).
💔 rls on linux: test-pass → build-fail (cc @nrc, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jul 11, 2018
Tested on commit rust-lang/rust@4ba5ff4.
Direct link to PR: <rust-lang/rust#52172>

💔 rls on windows: test-pass → build-fail (cc @nrc, @rust-lang/infra).
💔 rls on linux: test-pass → build-fail (cc @nrc, @rust-lang/infra).
@kennytm
Copy link
Member

kennytm commented Jul 12, 2018

RLS should probably use clippy_lints 0.0.212 instead.

[01:07:06]    Compiling clippy_lints v0.0.211 (https://github.com/rust-lang-nursery/rust-clippy?rev=6c70013f93a18c1ca7990efa8b1464acc6e18ce7#6c70013f)
[01:07:09] error[E0432]: unresolved import `rustc::middle::const_val`
[01:07:09]   --> /cargo/git/checkouts/rust-clippy-96f6c8ce0bc85cf5/6c70013/clippy_lints/src/consts.rs:16:20
[01:07:09]    |
[01:07:09] 16 | use rustc::middle::const_val::ConstVal;
[01:07:09]    |                    ^^^^^^^^^ Could not find `const_val` in `middle`
[01:07:09]
[01:07:10] error[E0531]: cannot find tuple struct/variant `TyImplTraitExistential` in this scope
[01:07:10]    --> /cargo/git/checkouts/rust-clippy-96f6c8ce0bc85cf5/6c70013/clippy_lints/src/lifetimes.rs:347:13
[01:07:10]     |
[01:07:10] 347 |             TyImplTraitExistential(exist_ty_id, _, _) => {
[01:07:10]     |             ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
[01:07:10]
[01:07:11] [RUSTC-TIMING] rustc_data_structures test:false 5.641
[01:07:12] error[E0599]: no associated item named `Public` found for type `syntax::codemap::Spanned<rustc::hir::VisibilityKind>` in the current scope
[01:07:12]   --> /cargo/git/checkouts/rust-clippy-96f6c8ce0bc85cf5/6c70013/clippy_lints/src/utils/inspector.rs:55:13
[01:07:12]    |
[01:07:12] 55 |             hir::Visibility::Public => println!("public"),
[01:07:12]    |             ^^^^^^^^^^^^^^^^^^^^^^^ associated item not found in `syntax::codemap::Spanned<rustc::hir::VisibilityKind>`
[01:07:12]
[01:07:12] error[E0599]: no associated item named `Crate` found for type `syntax::codemap::Spanned<rustc::hir::VisibilityKind>` in the current scope
[01:07:12]   --> /cargo/git/checkouts/rust-clippy-96f6c8ce0bc85cf5/6c70013/clippy_lints/src/utils/inspector.rs:56:13
[01:07:12]    |
[01:07:12] 56 |             hir::Visibility::Crate(_) => println!("visible crate wide"),
[01:07:12]    |             ^^^^^^^^^^^^^^^^^^^^^^^^^ associated item not found in `syntax::codemap::Spanned<rustc::hir::VisibilityKind>`
[01:07:12]
[01:07:12] error[E0223]: ambiguous associated type
[01:07:12]   --> /cargo/git/checkouts/rust-clippy-96f6c8ce0bc85cf5/6c70013/clippy_lints/src/utils/inspector.rs:57:13
[01:07:12]    |
[01:07:12] 57 |             hir::Visibility::Restricted { ref path, .. } => println!(
[01:07:12]    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type
[01:07:12]    |
[01:07:12]    = note: specify the type using the syntax `<syntax::codemap::Spanned<rustc::hir::VisibilityKind> as Trait>::Restricted`
[01:07:12]
[01:07:12] error[E0599]: no associated item named `Inherited` found for type `syntax::codemap::Spanned<rustc::hir::VisibilityKind>` in the current scope
[01:07:12]   --> /cargo/git/checkouts/rust-clippy-96f6c8ce0bc85cf5/6c70013/clippy_lints/src/utils/inspector.rs:61:13
[01:07:12]    |
[01:07:12] 61 |             hir::Visibility::Inherited => println!("visibility inherited from outer item"),
[01:07:12]    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ associated item not found in `syntax::codemap::Spanned<rustc::hir::VisibilityKind>`
[01:07:12]
[01:07:12] error[E0599]: no associated item named `Public` found for type `syntax::codemap::Spanned<rustc::hir::VisibilityKind>` in the current scope
[01:07:12]    --> /cargo/git/checkouts/rust-clippy-96f6c8ce0bc85cf5/6c70013/clippy_lints/src/utils/inspector.rs:347:9
[01:07:12]     |
[01:07:12] 347 |         hir::Visibility::Public => println!("public"),
[01:07:12]     |         ^^^^^^^^^^^^^^^^^^^^^^^ associated item not found in `syntax::codemap::Spanned<rustc::hir::VisibilityKind>`
[01:07:12]
[01:07:12] error[E0599]: no associated item named `Crate` found for type `syntax::codemap::Spanned<rustc::hir::VisibilityKind>` in the current scope
[01:07:12]    --> /cargo/git/checkouts/rust-clippy-96f6c8ce0bc85cf5/6c70013/clippy_lints/src/utils/inspector.rs:348:9
[01:07:12]     |
[01:07:12] 348 |         hir::Visibility::Crate(_) => println!("visible crate wide"),
[01:07:12]     |         ^^^^^^^^^^^^^^^^^^^^^^^^^ associated item not found in `syntax::codemap::Spanned<rustc::hir::VisibilityKind>`
[01:07:12]
[01:07:12] error[E0223]: ambiguous associated type
[01:07:12]    --> /cargo/git/checkouts/rust-clippy-96f6c8ce0bc85cf5/6c70013/clippy_lints/src/utils/inspector.rs:349:9
[01:07:12]     |
[01:07:12] 349 |         hir::Visibility::Restricted { ref path, .. } => println!(
[01:07:12]     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type
[01:07:12]     |
[01:07:12]     = note: specify the type using the syntax `<syntax::codemap::Spanned<rustc::hir::VisibilityKind> as Trait>::Restricted`
[01:07:12]
[01:07:12] error[E0599]: no associated item named `Inherited` found for type `syntax::codemap::Spanned<rustc::hir::VisibilityKind>` in the current scope
[01:07:12]    --> /cargo/git/checkouts/rust-clippy-96f6c8ce0bc85cf5/6c70013/clippy_lints/src/utils/inspector.rs:353:9
[01:07:12]     |
[01:07:12] 353 |         hir::Visibility::Inherited => println!("visibility inherited from outer item"),
[01:07:12]     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ associated item not found in `syntax::codemap::Spanned<rustc::hir::VisibilityKind>`
[01:07:12]
[01:07:12] error[E0599]: no associated item named `Inherited` found for type `syntax::codemap::Spanned<rustc::hir::VisibilityKind>` in the current scope
[01:07:12]    --> /cargo/git/checkouts/rust-clippy-96f6c8ce0bc85cf5/6c70013/clippy_lints/src/utils/internal_lints.rs:123:61
[01:07:12]     |
[01:07:12] 123 |             } else if is_lint_array_type(ty) && item.vis == Visibility::Inherited && item.name == "ARRAY" {
[01:07:12]     |                                                             ^^^^^^^^^^^^^^^^^^^^^ associated item not found in `syntax::codemap::Spanned<rustc::hir::VisibilityKind>`
[01:07:12]
[01:07:13] error[E0599]: no associated item named `Public` found for type `syntax::codemap::Spanned<rustc::hir::VisibilityKind>` in the current scope
[01:07:13]   --> /cargo/git/checkouts/rust-clippy-96f6c8ce0bc85cf5/6c70013/clippy_lints/src/enum_glob_use.rs:47:24
[01:07:13]    |
[01:07:13] 47 |         if item.vis == Visibility::Public {
[01:07:13]    |                        ^^^^^^^^^^^^^^^^^^ associated item not found in `syntax::codemap::Spanned<rustc::hir::VisibilityKind>`
[01:07:13]
[01:07:13] error[E0609]: no field `id` on type `&rustc::middle::mem_categorization::cmt_<'tcx>`
[01:07:13]    --> /cargo/git/checkouts/rust-clippy-96f6c8ce0bc85cf5/6c70013/clippy_lints/src/escape.rs:111:74
[01:07:13]     |
[01:07:13] 111 |             if let Some(NodeStmt(st)) = map.find(map.get_parent_node(cmt.id)) {
[01:07:13]     |                                                                          ^^
[01:07:13]
[01:07:14] error[E0599]: no associated item named `Public` found for type `syntax::codemap::Spanned<rustc::hir::VisibilityKind>` in the current scope
[01:07:14]    --> /cargo/git/checkouts/rust-clippy-96f6c8ce0bc85cf5/6c70013/clippy_lints/src/methods.rs:843:55
[01:07:14]     |
[01:07:14] 843 |                             let lint = if item.vis == hir::Visibility::Public {
[01:07:14]     |                                                       ^^^^^^^^^^^^^^^^^^^^^^^ associated item not found in `syntax::codemap::Spanned<rustc::hir::VisibilityKind>`
[01:07:14]
[01:07:15] error: aborting due to 14 previous errors
[01:07:15]
[01:07:15] Some errors occurred: E0223, E0432, E0531, E0599, E0609.
[01:07:15] For more information about an error, try `rustc --explain E0223`.
[01:07:15] [RUSTC-TIMING] clippy_lints test:false 9.480
[01:07:15] error: Could not compile `clippy_lints`.

@oli-obk oli-obk deleted the clippy_in_rls branch June 15, 2020 15:28
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants