Stable doesn't build either because of #1[feature] but I'm supposed to use nightly according to contributing.md anyway.
$ rustc --version
rustc 1.33.0-nightly (01f8e25b1 2019-01-24)
$ cargo build
Compiling clippy_lints v0.0.212 (https://github.com/rust-lang/rust-clippy?rev=280069ddc750d8a20d075c76322c45d5db4a48f8#280069dd)
Compiling rustc-ap-arena v306.0.0
Compiling rustc-ap-rustc_target v306.0.0
Compiling crossbeam-channel v0.3.6
Compiling rustc-ap-syntax_pos v306.0.0
Compiling ignore v0.4.6
error[E0433]: failed to resolve: could not find `quote` in `ext`
--> .../.cargo/git/checkouts/rust-clippy-4b72815e96774b3d/280069d/clippy_lints/src/panic_unimplemented.rs:7:18
|
7 | use syntax::ext::quote::rt::Span;
| ^^^^^ could not find `quote` in `ext`
error[E0412]: cannot find type `Span` in this scope
--> .../.cargo/git/checkouts/rust-clippy-4b72815e96774b3d/280069d/clippy_lints/src/panic_unimplemented.rs:76:35
|
76 | fn get_outer_span(expr: &Expr) -> Span {
| ^^^^ not found in this scope
help: possible candidates are found in other modules, you can import them into scope
|
1 | use regex_syntax::ast::Span;
|
1 | use syntax::source_map::Span;
|
1 | use syntax_pos::Span;
|
Compiling rustc-ap-rustc_errors v306.0.0
error: aborting due to 2 previous errors
Some errors occurred: E0412, E0433.
For more information about an error, try `rustc --explain E0412`.
error: Could not compile `clippy_lints`.
warning: build failed, waiting for other jobs to finish...
error: build failed
I presume this is ultimately an issue with Clippy. But how do people deal with this? Just wait 24 hours and try again tomorrow?
RLS releases are built with the version of clippy referenced by the rust-lang/rust submodule. So the Cargo.toml reference in this repo should be kept in line with that. This is also true for cargo.
This can be one thusly:
So if I did that right now I'd get
diff --git a/Cargo.toml b/Cargo.toml
index 0f25097..b3352ca 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -21,7 +21,7 @@ test = false
[dependencies]
cargo = { git = "https://github.com/rust-lang/cargo", rev = "907c0febe7045fa02dff2a35c5e36d3bd59ea50d" }
cargo_metadata = "0.7"
-clippy_lints = { git = "https://github.com/rust-lang/rust-clippy", rev = "280069ddc750d8a20d075c76322c45d5db4a48f8", optional = true }
+clippy_lints = { git = "https://github.com/rust-lang/rust-clippy", rev = "f1753522d8f3bb2d218266b4760f7a99f027f5ca", optional = true }
env_logger = "0.6"
failure = "0.1.1"
home = "0.3"
This should fix the build ... until clippy breaks again.
It would be great to have a bot to raise PRs whenever clippy & cargo submodules are updated upstream.
If you want to build RLS you may not even need clippy. RLS itself is actually less likely to break after rust internal changes. You can try building without clippy with cargo build --no-default-features
@alexcrichton Thank you for the detailed instructions! cargo build --no-default-features did complete successfully. cargo test gave me the same errors about Clippy so I tried running cargo test --no-default-features instead and that turned out okay!
Although I did see an error pop up in the middle randomly...
Running target/debug/deps/tests_old-ede58ed3b569b032
running 28 tests
test test_all_targets ... ok
test test_all_features ... ok
test ignore_uninitialized_notification ... ok
test fail_uninitialized_request ... ok
test test_bin_lib_project ... ok
test test_borrow_error ... ok
test test_features ... ok
test test_find_all_refs ... ok
test test_find_all_refs_no_cfg_test ... ok
test test_find_impls ... ok
test test_goto_def ... ok
test test_highlight ... ok
test test_hover ... ok
test test_infer_bin ... ok
test test_infer_custom_bin ... ok
test test_init_with_configuration ... ok
test test_infer_lib ... ok
test test_omit_init_build ... ok
[2019-01-25T21:09:26Z ERROR rls::server] Can't read message
test test_parse_error_on_malformed_input ... ok
test test_multiple_binaries ... ok
test test_no_default_features ... ok
test test_hover_after_src_line_change ... ok
test test_reformat ... ok
test test_reformat_with_range ... ok
test test_rename ... ok
test test_shutdown ... ok
test test_workspace_symbol ... ok
test test_workspace_symbol_duplicates ... ok
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Should these steps be captured in README.md or contributing.md? I am (very) new to Rust so perhaps I was missing something obvious somewhere.
I'm not the crichton himself, though I am a legitimate alex. I'm glad the steps helped you.
Yeah it's probably worth noting in contributing about disabling clippy to continue development while it's broken.
Good ol' autocomplete embarrassing people since its conception. Thank you, @alexheretic!
This should be fixed, meanwhile I'm going to close this in favor of #1266 - it'd be great to include that information in the docs itself!