aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-14 13:15:25 +0000
committerAleksey Kladov <[email protected]>2019-01-14 13:15:25 +0000
commitdb43b44f71818df4d6cc100969d21a65d3ce2645 (patch)
treef32f55787771aef45c4a5ab40e5f707904ae1c3d
parent8caff4e03475c20392f13e8c6ad469bd01a4b4ce (diff)
update cargo_metadata
-rw-r--r--Cargo.lock8
-rw-r--r--Cargo.toml1
-rw-r--r--crates/ra_lsp_server/Cargo.toml2
-rw-r--r--crates/ra_lsp_server/src/project_model/cargo_workspace.rs7
4 files changed, 10 insertions, 8 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 504a5633f..04e947f62 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -111,8 +111,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
111 111
112[[package]] 112[[package]]
113name = "cargo_metadata" 113name = "cargo_metadata"
114version = "0.6.4" 114version = "0.7.0"
115source = "git+https://github.com/oli-obk/cargo_metadata.git?rev=f73e27b24e#f73e27b24e92cd9b520a78497cd1017b70a6c99a" 115source = "registry+https://github.com/rust-lang/crates.io-index"
116dependencies = [ 116dependencies = [
117 "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", 117 "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
118 "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 118 "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -722,7 +722,7 @@ dependencies = [
722name = "ra_lsp_server" 722name = "ra_lsp_server"
723version = "0.1.0" 723version = "0.1.0"
724dependencies = [ 724dependencies = [
725 "cargo_metadata 0.6.4 (git+https://github.com/oli-obk/cargo_metadata.git?rev=f73e27b24e)", 725 "cargo_metadata 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
726 "crossbeam-channel 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 726 "crossbeam-channel 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
727 "drop_bomb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 727 "drop_bomb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
728 "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 728 "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1489,7 +1489,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1489"checksum block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a076c298b9ecdb530ed9d967e74a6027d6a7478924520acddcddc24c1c8ab3ab" 1489"checksum block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a076c298b9ecdb530ed9d967e74a6027d6a7478924520acddcddc24c1c8ab3ab"
1490"checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" 1490"checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40"
1491"checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d" 1491"checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d"
1492"checksum cargo_metadata 0.6.4 (git+https://github.com/oli-obk/cargo_metadata.git?rev=f73e27b24e)" = "<none>" 1492"checksum cargo_metadata 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "95932a7ed5f2308fc00a46d2aa8eb1b06b402c896c2df424916ee730ba610c2e"
1493"checksum cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a8b715cb4597106ea87c7c84b2f1d452c7492033765df7f32651e66fcf749" 1493"checksum cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a8b715cb4597106ea87c7c84b2f1d452c7492033765df7f32651e66fcf749"
1494"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" 1494"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4"
1495"checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" 1495"checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878"
diff --git a/Cargo.toml b/Cargo.toml
index 85aaa23b9..59ce6b23d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,5 +6,4 @@ incremental = true
6debug = true 6debug = true
7 7
8[patch.'crates-io'] 8[patch.'crates-io']
9cargo_metadata = { git = "https://github.com/oli-obk/cargo_metadata.git", rev="f73e27b24e" }
10salsa = { git = "https://github.com/matklad/salsa", branch = "panic-hooks" } 9salsa = { git = "https://github.com/matklad/salsa", branch = "panic-hooks" }
diff --git a/crates/ra_lsp_server/Cargo.toml b/crates/ra_lsp_server/Cargo.toml
index 0557897fd..e87d311eb 100644
--- a/crates/ra_lsp_server/Cargo.toml
+++ b/crates/ra_lsp_server/Cargo.toml
@@ -20,7 +20,7 @@ url_serde = "0.2.0"
20lsp-types = "0.54.0" 20lsp-types = "0.54.0"
21walkdir = "2.2.7" 21walkdir = "2.2.7"
22im = "12.0.0" 22im = "12.0.0"
23cargo_metadata = "0.6.0" 23cargo_metadata = "0.7.0"
24rustc-hash = "1.0" 24rustc-hash = "1.0"
25parking_lot = "0.7.0" 25parking_lot = "0.7.0"
26 26
diff --git a/crates/ra_lsp_server/src/project_model/cargo_workspace.rs b/crates/ra_lsp_server/src/project_model/cargo_workspace.rs
index 8f7518860..75ae78bca 100644
--- a/crates/ra_lsp_server/src/project_model/cargo_workspace.rs
+++ b/crates/ra_lsp_server/src/project_model/cargo_workspace.rs
@@ -1,6 +1,6 @@
1use std::path::{Path, PathBuf}; 1use std::path::{Path, PathBuf};
2 2
3use cargo_metadata::{metadata_run, CargoOpt}; 3use cargo_metadata::{MetadataCommand, CargoOpt};
4use ra_syntax::SmolStr; 4use ra_syntax::SmolStr;
5use ra_arena::{Arena, RawId, impl_arena_id}; 5use ra_arena::{Arena, RawId, impl_arena_id};
6use rustc_hash::FxHashMap; 6use rustc_hash::FxHashMap;
@@ -117,7 +117,10 @@ impl Target {
117 117
118impl CargoWorkspace { 118impl CargoWorkspace {
119 pub fn from_cargo_metadata(cargo_toml: &Path) -> Result<CargoWorkspace> { 119 pub fn from_cargo_metadata(cargo_toml: &Path) -> Result<CargoWorkspace> {
120 let meta = metadata_run(Some(cargo_toml), true, Some(CargoOpt::AllFeatures)) 120 let meta = MetadataCommand::new()
121 .manifest_path(cargo_toml)
122 .features(CargoOpt::AllFeatures)
123 .exec()
121 .map_err(|e| format_err!("cargo metadata failed: {}", e))?; 124 .map_err(|e| format_err!("cargo metadata failed: {}", e))?;
122 let mut pkg_by_id = FxHashMap::default(); 125 let mut pkg_by_id = FxHashMap::default();
123 let mut packages = Arena::default(); 126 let mut packages = Arena::default();