From 8c72c00abdbf9efe54b0d84d7a9d24b01ae6762a Mon Sep 17 00:00:00 2001 From: Shotaro Yamada Date: Sat, 12 Oct 2019 07:48:23 +0900 Subject: [PATCH 1/4] Remove smol_str dependency from ra_syntax --- crates/ra_syntax/Cargo.toml | 4 ---- crates/ra_tt/Cargo.toml | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/crates/ra_syntax/Cargo.toml b/crates/ra_syntax/Cargo.toml index 9bc85404a00..b2d87ba03ee 100644 --- a/crates/ra_syntax/Cargo.toml +++ b/crates/ra_syntax/Cargo.toml @@ -15,10 +15,6 @@ rustc-hash = "1.0.1" arrayvec = "0.4.10" once_cell = "1.2.0" -# ideally, `serde` should be enabled by `ra_lsp_server`, but we enable it here -# to reduce number of compilations -smol_str = { version = "0.1.12", features = ["serde"] } - ra_text_edit = { path = "../ra_text_edit" } ra_parser = { path = "../ra_parser" } diff --git a/crates/ra_tt/Cargo.toml b/crates/ra_tt/Cargo.toml index 3328d312fac..3fcc7f08550 100644 --- a/crates/ra_tt/Cargo.toml +++ b/crates/ra_tt/Cargo.toml @@ -5,4 +5,6 @@ version = "0.1.0" authors = ["rust-analyzer developers"] [dependencies] -smol_str = "0.1.9" +# ideally, `serde` should be enabled by `ra_lsp_server`, but we enable it here +# to reduce number of compilations +smol_str = { version = "0.1.12", features = ["serde"] } From 5ca6281164d73da7c9b22650ea7d80077908ffbf Mon Sep 17 00:00:00 2001 From: Shotaro Yamada Date: Sat, 12 Oct 2019 08:00:54 +0900 Subject: [PATCH 2/4] Remove unused dependencies --- Cargo.lock | 7 ------- crates/ra_assists/Cargo.toml | 3 --- crates/ra_lsp_server/Cargo.toml | 2 -- crates/ra_mbe/Cargo.toml | 1 - 4 files changed, 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 965d5aaa038..e3e474e8302 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -891,17 +891,14 @@ version = "0.1.0" name = "ra_assists" version = "0.1.0" dependencies = [ - "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "format-buf 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "join_to_string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "ra_db 0.1.0", "ra_fmt 0.1.0", "ra_hir 0.1.0", "ra_syntax 0.1.0", "ra_text_edit 0.1.0", - "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_lexer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "test_utils 0.1.0", ] @@ -1031,8 +1028,6 @@ dependencies = [ "lsp-server 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lsp-types 0.61.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ra_cfg 0.1.0", - "ra_db 0.1.0", "ra_ide_api 0.1.0", "ra_prof 0.1.0", "ra_project_model 0.1.0", @@ -1053,7 +1048,6 @@ dependencies = [ name = "ra_mbe" version = "0.1.0" dependencies = [ - "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "ra_parser 0.1.0", "ra_syntax 0.1.0", @@ -1107,7 +1101,6 @@ dependencies = [ "rowan 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_lexer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smol_str 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "test_utils 0.1.0", "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/crates/ra_assists/Cargo.toml b/crates/ra_assists/Cargo.toml index d3b6aeb36a7..beebccbd9cb 100644 --- a/crates/ra_assists/Cargo.toml +++ b/crates/ra_assists/Cargo.toml @@ -6,11 +6,8 @@ authors = ["rust-analyzer developers"] [dependencies] format-buf = "1.0.0" -once_cell = "1.0.1" join_to_string = "0.1.3" itertools = "0.8.0" -arrayvec = "0.4.10" -rustc-hash = "1.0.1" rustc_lexer = "0.1.0" ra_syntax = { path = "../ra_syntax" } diff --git a/crates/ra_lsp_server/Cargo.toml b/crates/ra_lsp_server/Cargo.toml index aedc55a95ce..46a0f958c06 100644 --- a/crates/ra_lsp_server/Cargo.toml +++ b/crates/ra_lsp_server/Cargo.toml @@ -18,8 +18,6 @@ parking_lot = "0.9.0" jod-thread = "0.1.0" ra_vfs = "0.4.0" ra_syntax = { path = "../ra_syntax" } -ra_db = { path = "../ra_db" } -ra_cfg = { path = "../ra_cfg" } ra_text_edit = { path = "../ra_text_edit" } ra_ide_api = { path = "../ra_ide_api" } lsp-server = "0.2.0" diff --git a/crates/ra_mbe/Cargo.toml b/crates/ra_mbe/Cargo.toml index b058dde91c1..e8ef2457bb9 100644 --- a/crates/ra_mbe/Cargo.toml +++ b/crates/ra_mbe/Cargo.toml @@ -8,7 +8,6 @@ authors = ["rust-analyzer developers"] ra_syntax = { path = "../ra_syntax" } ra_parser = { path = "../ra_parser" } tt = { path = "../ra_tt", package = "ra_tt" } -itertools = "0.8.0" rustc-hash = "1.0.0" smallvec = "0.6.9" log = "0.4.5" From e4ffa79b3eb6e5bfc0c216d7af3811c56caf2101 Mon Sep 17 00:00:00 2001 From: Shotaro Yamada Date: Mon, 14 Oct 2019 19:56:29 +0900 Subject: [PATCH 3/4] Enable `serde` feature in ra_syntax/Cargo.toml --- crates/ra_syntax/Cargo.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/ra_syntax/Cargo.toml b/crates/ra_syntax/Cargo.toml index b2d87ba03ee..68c594202f6 100644 --- a/crates/ra_syntax/Cargo.toml +++ b/crates/ra_syntax/Cargo.toml @@ -15,6 +15,11 @@ rustc-hash = "1.0.1" arrayvec = "0.4.10" once_cell = "1.2.0" +# This crate transitively depends on `smol_str` via `rowan`. +# ideally, `serde` should be enabled by `ra_lsp_server`, but we enable it here +# to reduce number of compilations +smol_str = { version = "0.1.12", features = ["serde"] } + ra_text_edit = { path = "../ra_text_edit" } ra_parser = { path = "../ra_parser" } From ad1323c0a7af3c2e604df089f73f3ebb5f91a97c Mon Sep 17 00:00:00 2001 From: Shotaro Yamada Date: Mon, 14 Oct 2019 19:58:38 +0900 Subject: [PATCH 4/4] Update Cargo.lock --- Cargo.lock | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.lock b/Cargo.lock index e3e474e8302..0826b056a25 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1101,6 +1101,7 @@ dependencies = [ "rowan 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_lexer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smol_str 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "test_utils 0.1.0", "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", ]