Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
830 changes: 421 additions & 409 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ anyhow = "1.0.26"
cargo = { git = "https://github.com/rust-lang/cargo", rev = "8dd533662007374412f460b4e442d3f8c193bff9" }
cargo-util = { git = "https://github.com/rust-lang/cargo", rev = "8dd533662007374412f460b4e442d3f8c193bff9" }
cargo_metadata = "0.12"
clippy_lints = { git = "https://github.com/rust-lang/rust-clippy", rev = "a55912c48e4ac08c0ac39a2d562b44699fa20d4d", optional = true }
clippy_lints = { git = "https://github.com/rust-lang/rust-clippy", rev = "81f37a8150fc86f8de00e6947e86d2b69291906a", optional = true }
env_logger = "0.7"
home = "0.5.1"
itertools = "0.9"
Expand All @@ -47,7 +47,7 @@ racer = { version = "2.1.47", default-features = false }
rand = "0.7"
rayon = "1"
rustc_tools_util = "0.2"
rustfmt-nightly = { git = "https://github.com/rust-lang/rustfmt", rev = "28460e1e9aff317fa1bbca95b22421e7ccd7723d" }
rustfmt-nightly = { git = "https://github.com/rust-lang/rustfmt", rev = "ea199bacef07213dbe008841b89c450e3bf0c638" }
serde = "1.0"
serde_json = "1.0"
serde_derive = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion rls-rustc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ categories = ["development-tools"]
env_logger = "0.7"
log = "0.4"
rand = "0.7"
clippy_lints = { git = "https://github.com/rust-lang/rust-clippy", rev = "a55912c48e4ac08c0ac39a2d562b44699fa20d4d", optional = true }
clippy_lints = { git = "https://github.com/rust-lang/rust-clippy", rev = "81f37a8150fc86f8de00e6947e86d2b69291906a", optional = true }
tokio = { version = "1", optional = true }
futures = { version = "0.3", optional = true }
serde = { version = "1", features = ["derive"], optional = true }
Expand Down
2 changes: 1 addition & 1 deletion rls-rustc/src/clippy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub fn config(config: &mut rustc_interface::interface::Config) {

let conf = clippy_lints::read_conf(&sess);
clippy_lints::register_plugins(&mut lint_store, &sess, &conf);
clippy_lints::register_pre_expansion_lints(&mut lint_store);
clippy_lints::register_pre_expansion_lints(&mut lint_store, &sess, &conf);
clippy_lints::register_renamed(&mut lint_store);
}));
}
6 changes: 3 additions & 3 deletions rls-rustc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl Callbacks for ShimCalls {
let sess = compiler.session();
let input = compiler.input();

let cwd = &sess.working_dir.local_path_if_available();
let cwd = &sess.opts.working_dir.local_path_if_available();

let src_path = match input {
Input::File(ref name) => Some(name.to_path_buf()),
Expand All @@ -132,7 +132,7 @@ impl Callbacks for ShimCalls {
let krate = Crate {
name: queries.crate_name().unwrap().peek().to_owned(),
src_path,
disambiguator: sess.local_crate_disambiguator().to_fingerprint().as_value(),
disambiguator: (sess.local_stable_crate_id().to_u64(), 0),
edition: match sess.edition() {
rustc_span::edition::Edition::Edition2015 => Edition::Edition2015,
rustc_span::edition::Edition::Edition2018 => Edition::Edition2018,
Expand Down Expand Up @@ -209,7 +209,7 @@ impl Callbacks for ShimCalls {

#[cfg(feature = "ipc")]
fn fetch_input_files(sess: &rustc_session::Session) -> Vec<PathBuf> {
let cwd = &sess.working_dir.local_path_if_available();
let cwd = &sess.opts.working_dir.local_path_if_available();

sess.source_map()
.files()
Expand Down
2 changes: 1 addition & 1 deletion rls/src/actions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ impl FileWatch {
}

pub fn from_project_root(root: PathBuf) -> Self {
Self { project_uri: Url::from_file_path(&root).unwrap().into_string(), project_path: root }
Self { project_uri: Url::from_file_path(&root).unwrap().into(), project_path: root }
}

/// Returns json config for desired file watches
Expand Down
11 changes: 1 addition & 10 deletions rls/src/build/external.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ fn plan_from_analysis(analysis: &[Analysis], build_dir: &Path) -> Result<Externa
let invocations: Vec<RawInvocation> = analysis
.iter()
.map(|a| {
let CompilationOptions { ref directory, ref program, ref arguments, ref output } =
let CompilationOptions { ref directory, ref program, ref arguments, .. } =
a.compilation.as_ref().ok_or(())?;

let deps: Vec<usize> = a
Expand All @@ -144,11 +144,9 @@ fn plan_from_analysis(analysis: &[Analysis], build_dir: &Path) -> Result<Externa

Ok(RawInvocation {
deps,
outputs: vec![output.clone()],
program: program.clone(),
args: arguments.clone(),
env: Default::default(),
links: Default::default(),
cwd: Some(cwd),
})
})
Expand All @@ -166,9 +164,6 @@ pub(crate) struct RawPlan {
#[derive(Debug, Deserialize)]
pub(crate) struct RawInvocation {
pub(crate) deps: Vec<usize>,
pub(crate) outputs: Vec<PathBuf>,
#[serde(default)]
pub(crate) links: BTreeMap<PathBuf, PathBuf>,
pub(crate) program: String,
pub(crate) args: Vec<String>,
pub(crate) env: BTreeMap<String, String>,
Expand All @@ -180,8 +175,6 @@ pub(crate) struct RawInvocation {
pub(crate) struct Invocation {
// FIXME: use arena and store refs instead for ergonomics.
deps: Vec<usize>,
outputs: Vec<PathBuf>,
links: BTreeMap<PathBuf, PathBuf>,
command: ProcessBuilder,
// Parsed data.
src_path: Option<PathBuf>,
Expand Down Expand Up @@ -228,8 +221,6 @@ impl Invocation {

Invocation {
deps: raw.deps.to_owned(),
outputs: raw.outputs.to_owned(),
links: raw.links,
src_path: guess_rustc_src_path(build_dir, &command),
command,
}
Expand Down
8 changes: 4 additions & 4 deletions rls/src/build/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ impl rustc_driver::Callbacks for RlsRustcCalls {
let input = compiler.input();
let crate_name = queries.crate_name().unwrap().peek().clone();

let cwd = &sess.working_dir.local_path_if_available();
let cwd = &sess.opts.working_dir.local_path_if_available();

let src_path = match input {
Input::File(ref name) => Some(name.to_path_buf()),
Expand All @@ -250,7 +250,7 @@ impl rustc_driver::Callbacks for RlsRustcCalls {
let krate = Crate {
name: crate_name,
src_path,
disambiguator: sess.local_crate_disambiguator().to_fingerprint().as_value(),
disambiguator: (sess.local_stable_crate_id().to_u64(), 0),
edition: match sess.edition() {
RustcEdition::Edition2015 => Edition::Edition2015,
RustcEdition::Edition2018 => Edition::Edition2018,
Expand Down Expand Up @@ -321,13 +321,13 @@ fn clippy_config(config: &mut interface::Config) {

let conf = clippy_lints::read_conf(&sess);
clippy_lints::register_plugins(&mut lint_store, &sess, &conf);
clippy_lints::register_pre_expansion_lints(&mut lint_store);
clippy_lints::register_pre_expansion_lints(&mut lint_store, &sess, &conf);
clippy_lints::register_renamed(&mut lint_store);
}));
}

fn fetch_input_files(sess: &Session) -> Vec<PathBuf> {
let cwd = &sess.working_dir.local_path_if_available();
let cwd = &sess.opts.working_dir.local_path_if_available();

sess.source_map()
.files()
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2021-05-19"
channel = "nightly-2021-11-24"
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]