diff options
author | Aleksey Kladov <[email protected]> | 2019-01-14 13:15:25 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-14 13:15:25 +0000 |
commit | db43b44f71818df4d6cc100969d21a65d3ce2645 (patch) | |
tree | f32f55787771aef45c4a5ab40e5f707904ae1c3d | |
parent | 8caff4e03475c20392f13e8c6ad469bd01a4b4ce (diff) |
update cargo_metadata
-rw-r--r-- | Cargo.lock | 8 | ||||
-rw-r--r-- | Cargo.toml | 1 | ||||
-rw-r--r-- | crates/ra_lsp_server/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/project_model/cargo_workspace.rs | 7 |
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]] |
113 | name = "cargo_metadata" | 113 | name = "cargo_metadata" |
114 | version = "0.6.4" | 114 | version = "0.7.0" |
115 | source = "git+https://github.com/oli-obk/cargo_metadata.git?rev=f73e27b24e#f73e27b24e92cd9b520a78497cd1017b70a6c99a" | 115 | source = "registry+https://github.com/rust-lang/crates.io-index" |
116 | dependencies = [ | 116 | dependencies = [ |
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 = [ | |||
722 | name = "ra_lsp_server" | 722 | name = "ra_lsp_server" |
723 | version = "0.1.0" | 723 | version = "0.1.0" |
724 | dependencies = [ | 724 | dependencies = [ |
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 | |||
6 | debug = true | 6 | debug = true |
7 | 7 | ||
8 | [patch.'crates-io'] | 8 | [patch.'crates-io'] |
9 | cargo_metadata = { git = "https://github.com/oli-obk/cargo_metadata.git", rev="f73e27b24e" } | ||
10 | salsa = { git = "https://github.com/matklad/salsa", branch = "panic-hooks" } | 9 | salsa = { 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" | |||
20 | lsp-types = "0.54.0" | 20 | lsp-types = "0.54.0" |
21 | walkdir = "2.2.7" | 21 | walkdir = "2.2.7" |
22 | im = "12.0.0" | 22 | im = "12.0.0" |
23 | cargo_metadata = "0.6.0" | 23 | cargo_metadata = "0.7.0" |
24 | rustc-hash = "1.0" | 24 | rustc-hash = "1.0" |
25 | parking_lot = "0.7.0" | 25 | parking_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 @@ | |||
1 | use std::path::{Path, PathBuf}; | 1 | use std::path::{Path, PathBuf}; |
2 | 2 | ||
3 | use cargo_metadata::{metadata_run, CargoOpt}; | 3 | use cargo_metadata::{MetadataCommand, CargoOpt}; |
4 | use ra_syntax::SmolStr; | 4 | use ra_syntax::SmolStr; |
5 | use ra_arena::{Arena, RawId, impl_arena_id}; | 5 | use ra_arena::{Arena, RawId, impl_arena_id}; |
6 | use rustc_hash::FxHashMap; | 6 | use rustc_hash::FxHashMap; |
@@ -117,7 +117,10 @@ impl Target { | |||
117 | 117 | ||
118 | impl CargoWorkspace { | 118 | impl 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(); |