]> git.lizzy.rs Git - rust.git/commitdiff
Merge #538
authorbors[bot] <bors[bot]@users.noreply.github.com>
Mon, 14 Jan 2019 13:16:21 +0000 (13:16 +0000)
committerbors[bot] <bors[bot]@users.noreply.github.com>
Mon, 14 Jan 2019 13:16:21 +0000 (13:16 +0000)
538: update cargo_metadata r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Cargo.lock
Cargo.toml
crates/ra_lsp_server/Cargo.toml
crates/ra_lsp_server/src/project_model/cargo_workspace.rs

index 504a5633f262b13f4947aadefb035de5d6ad20ad..04e947f62827f4893ba190ddfff7d1367d9e0fc6 100644 (file)
@@ -111,8 +111,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "cargo_metadata"
-version = "0.6.4"
-source = "git+https://github.com/oli-obk/cargo_metadata.git?rev=f73e27b24e#f73e27b24e92cd9b520a78497cd1017b70a6c99a"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -722,7 +722,7 @@ dependencies = [
 name = "ra_lsp_server"
 version = "0.1.0"
 dependencies = [
- "cargo_metadata 0.6.4 (git+https://github.com/oli-obk/cargo_metadata.git?rev=f73e27b24e)",
+ "cargo_metadata 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "crossbeam-channel 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "drop_bomb 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "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"
 "checksum block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a076c298b9ecdb530ed9d967e74a6027d6a7478924520acddcddc24c1c8ab3ab"
 "checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40"
 "checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d"
-"checksum cargo_metadata 0.6.4 (git+https://github.com/oli-obk/cargo_metadata.git?rev=f73e27b24e)" = "<none>"
+"checksum cargo_metadata 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "95932a7ed5f2308fc00a46d2aa8eb1b06b402c896c2df424916ee730ba610c2e"
 "checksum cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a8b715cb4597106ea87c7c84b2f1d452c7492033765df7f32651e66fcf749"
 "checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4"
 "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878"
index 85aaa23b95034688516ac183595290df3fabb6f7..59ce6b23d7892823ea6933d8f5975a75eb6adfbe 100644 (file)
@@ -6,5 +6,4 @@ incremental = true
 debug = true
 
 [patch.'crates-io']
-cargo_metadata = { git = "https://github.com/oli-obk/cargo_metadata.git", rev="f73e27b24e" }
 salsa = { git = "https://github.com/matklad/salsa", branch = "panic-hooks" }
index 0557897fdbfe886c1e5559a9d51e5ef4a6959d56..e87d311ebb37a4b388479427f087ed0543f504aa 100644 (file)
@@ -20,7 +20,7 @@ url_serde = "0.2.0"
 lsp-types = "0.54.0"
 walkdir = "2.2.7"
 im = "12.0.0"
-cargo_metadata = "0.6.0"
+cargo_metadata = "0.7.0"
 rustc-hash = "1.0"
 parking_lot = "0.7.0"
 
index 8f75188607de1154e4664e947f1cd98468b08fc2..75ae78bca709a856a8269abd2c0f7f0ccce3db9d 100644 (file)
@@ -1,6 +1,6 @@
 use std::path::{Path, PathBuf};
 
-use cargo_metadata::{metadata_run, CargoOpt};
+use cargo_metadata::{MetadataCommand, CargoOpt};
 use ra_syntax::SmolStr;
 use ra_arena::{Arena, RawId, impl_arena_id};
 use rustc_hash::FxHashMap;
@@ -117,7 +117,10 @@ pub fn kind(self, ws: &CargoWorkspace) -> TargetKind {
 
 impl CargoWorkspace {
     pub fn from_cargo_metadata(cargo_toml: &Path) -> Result<CargoWorkspace> {
-        let meta = metadata_run(Some(cargo_toml), true, Some(CargoOpt::AllFeatures))
+        let meta = MetadataCommand::new()
+            .manifest_path(cargo_toml)
+            .features(CargoOpt::AllFeatures)
+            .exec()
             .map_err(|e| format_err!("cargo metadata failed: {}", e))?;
         let mut pkg_by_id = FxHashMap::default();
         let mut packages = Arena::default();