Repository: rust-analyzer/rust-analyzer
Pull request #3792 (2020-03-31 15:30:08)

Rename cargo_watch -> flycheck


bors r+
🤖


Patch:
diff --git a/Cargo.lock b/Cargo.lock
index f618fcc3db..bdbb316cd9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -886,19 +886,6 @@ dependencies = [
  "test_utils",
 ]
 
-[[package]]
-name = "ra_cargo_watch"
-version = "0.1.0"
-dependencies = [
- "cargo_metadata",
- "crossbeam-channel",
- "insta",
- "jod-thread",
- "log",
- "lsp-types",
- "serde_json",
-]
-
 [[package]]
 name = "ra_cfg"
 version = "0.1.0"
@@ -923,6 +910,19 @@ dependencies = [
  "test_utils",
 ]
 
+[[package]]
+name = "ra_flycheck"
+version = "0.1.0"
+dependencies = [
+ "cargo_metadata",
+ "crossbeam-channel",
+ "insta",
+ "jod-thread",
+ "log",
+ "lsp-types",
+ "serde_json",
+]
+
 [[package]]
 name = "ra_fmt"
 version = "0.1.0"
@@ -1101,9 +1101,9 @@ dependencies = [
  "cargo_metadata",
  "log",
  "ra_arena",
- "ra_cargo_watch",
  "ra_cfg",
  "ra_db",
+ "ra_flycheck",
  "ra_proc_macro",
  "rustc-hash",
  "serde",
@@ -1300,8 +1300,8 @@ dependencies = [
  "lsp-types",
  "parking_lot",
  "pico-args",
- "ra_cargo_watch",
  "ra_db",
+ "ra_flycheck",
  "ra_hir",
  "ra_hir_def",
  "ra_hir_ty",
diff --git a/crates/ra_cargo_watch/Cargo.toml b/crates/ra_flycheck/Cargo.toml
similarity index 92%
rename from crates/ra_cargo_watch/Cargo.toml
rename to crates/ra_flycheck/Cargo.toml
index 300033a183..c9a9ddc122 100644
--- a/crates/ra_cargo_watch/Cargo.toml
+++ b/crates/ra_flycheck/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 edition = "2018"
-name = "ra_cargo_watch"
+name = "ra_flycheck"
 version = "0.1.0"
 authors = ["rust-analyzer developers"]
 
diff --git a/crates/ra_cargo_watch/src/conv/test.rs b/crates/ra_flycheck/src/conv/test.rs
similarity index 100%
rename from crates/ra_cargo_watch/src/conv/test.rs
rename to crates/ra_flycheck/src/conv/test.rs
diff --git a/crates/ra_cargo_watch/src/lib.rs b/crates/ra_flycheck/src/lib.rs
similarity index 100%
rename from crates/ra_cargo_watch/src/lib.rs
rename to crates/ra_flycheck/src/lib.rs
diff --git a/crates/ra_project_model/Cargo.toml b/crates/ra_project_model/Cargo.toml
index cdcdd63c91..c3b7a8f74c 100644
--- a/crates/ra_project_model/Cargo.toml
+++ b/crates/ra_project_model/Cargo.toml
@@ -16,7 +16,7 @@ cargo_metadata = "0.9.1"
 ra_arena = { path = "../ra_arena" }
 ra_db = { path = "../ra_db" }
 ra_cfg = { path = "../ra_cfg" }
-ra_cargo_watch = { path = "../ra_cargo_watch" }
+ra_flycheck = { path = "../ra_flycheck" }
 ra_proc_macro =  { path = "../ra_proc_macro" }
 
 serde = { version = "1.0.104", features = ["derive"] }
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs
index 0aea01d833..78ea2ab584 100644
--- a/crates/ra_project_model/src/cargo_workspace.rs
+++ b/crates/ra_project_model/src/cargo_workspace.rs
@@ -9,8 +9,8 @@ use std::{
 use anyhow::{Context, Result};
 use cargo_metadata::{BuildScript, CargoOpt, Message, MetadataCommand, PackageId};
 use ra_arena::{Arena, Idx};
-use ra_cargo_watch::run_cargo;
 use ra_db::Edition;
+use ra_flycheck::run_cargo;
 use rustc_hash::FxHashMap;
 use serde::Deserialize;
 
diff --git a/crates/rust-analyzer/Cargo.toml b/crates/rust-analyzer/Cargo.toml
index 8fe6799d23..f5f7734325 100644
--- a/crates/rust-analyzer/Cargo.toml
+++ b/crates/rust-analyzer/Cargo.toml
@@ -33,7 +33,7 @@ threadpool = "1.7.1"
 stdx = { path = "../stdx" }
 
 lsp-server = "0.3.1"
-ra_cargo_watch = { path = "../ra_cargo_watch" }
+ra_flycheck = { path = "../ra_flycheck" }
 ra_ide = { path = "../ra_ide" }
 ra_prof = { path = "../ra_prof" }
 ra_project_model = { path = "../ra_project_model" }
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index 9fd5686016..bb33fb27d5 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -21,7 +21,7 @@ use lsp_types::{
     WorkDoneProgressBegin, WorkDoneProgressCreateParams, WorkDoneProgressEnd,
     WorkDoneProgressReport,
 };
-use ra_cargo_watch::{url_from_path_with_drive_lowercasing, CheckConfig, CheckTask};
+use ra_flycheck::{url_from_path_with_drive_lowercasing, CheckConfig, CheckTask};
 use ra_ide::{Canceled, FileId, InlayHintsConfig, LibraryData, SourceRootId};
 use ra_prof::profile;
 use ra_vfs::{VfsFile, VfsTask, Watch};
diff --git a/crates/rust-analyzer/src/world.rs b/crates/rust-analyzer/src/world.rs
index 4e2ddcb8bb..acb729bae7 100644
--- a/crates/rust-analyzer/src/world.rs
+++ b/crates/rust-analyzer/src/world.rs
@@ -11,7 +11,7 @@ use std::{
 use crossbeam_channel::{unbounded, Receiver};
 use lsp_types::Url;
 use parking_lot::RwLock;
-use ra_cargo_watch::{url_from_path_with_drive_lowercasing, CheckConfig, CheckWatcher};
+use ra_flycheck::{url_from_path_with_drive_lowercasing, CheckConfig, CheckWatcher};
 use ra_ide::{
     Analysis, AnalysisChange, AnalysisHost, CrateGraph, FileId, InlayHintsConfig, LibraryData,
     SourceRootId,


Test patch:
diff --git a/crates/ra_cargo_watch/src/conv.rs b/crates/ra_flycheck/src/conv.rs
similarity index 100%
rename from crates/ra_cargo_watch/src/conv.rs
rename to crates/ra_flycheck/src/conv.rs
diff --git a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_clippy_pass_by_ref.snap b/crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_clippy_pass_by_ref.snap
similarity index 98%
rename from crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_clippy_pass_by_ref.snap
rename to crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_clippy_pass_by_ref.snap
index a59fa84faa..4c9db0385b 100644
--- a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_clippy_pass_by_ref.snap
+++ b/crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_clippy_pass_by_ref.snap
@@ -1,5 +1,5 @@
 ---
-source: crates/ra_cargo_watch/src/conv/test.rs
+source: crates/ra_flycheck/src/conv/test.rs
 expression: diag
 ---
 [
diff --git a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_handles_macro_location.snap b/crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_handles_macro_location.snap
similarity index 96%
rename from crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_handles_macro_location.snap
rename to crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_handles_macro_location.snap
index 61ae0c9aee..7cde4d8670 100644
--- a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_handles_macro_location.snap
+++ b/crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_handles_macro_location.snap
@@ -1,5 +1,5 @@
 ---
-source: crates/ra_cargo_watch/src/conv/test.rs
+source: crates/ra_flycheck/src/conv/test.rs
 expression: diag
 ---
 [
diff --git a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_macro_compiler_error.snap b/crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_macro_compiler_error.snap
similarity index 97%
rename from crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_macro_compiler_error.snap
rename to crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_macro_compiler_error.snap
index 641da1a588..1cc37e087f 100644
--- a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_macro_compiler_error.snap
+++ b/crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_macro_compiler_error.snap
@@ -1,5 +1,5 @@
 ---
-source: crates/ra_cargo_watch/src/conv/test.rs
+source: crates/ra_flycheck/src/conv/test.rs
 expression: diag
 ---
 [
diff --git a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_multi_line_fix.snap b/crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_multi_line_fix.snap
similarity index 98%
rename from crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_multi_line_fix.snap
rename to crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_multi_line_fix.snap
index 0557a2e79e..615ed83787 100644
--- a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_multi_line_fix.snap
+++ b/crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_multi_line_fix.snap
@@ -1,5 +1,5 @@
 ---
-source: crates/ra_cargo_watch/src/conv/test.rs
+source: crates/ra_flycheck/src/conv/test.rs
 expression: diag
 ---
 [
diff --git a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_incompatible_type_for_trait.snap b/crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_rustc_incompatible_type_for_trait.snap
similarity index 96%
rename from crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_incompatible_type_for_trait.snap
rename to crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_rustc_incompatible_type_for_trait.snap
index 754bc33a46..0df0fce188 100644
--- a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_incompatible_type_for_trait.snap
+++ b/crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_rustc_incompatible_type_for_trait.snap
@@ -1,5 +1,5 @@
 ---
-source: crates/ra_cargo_watch/src/conv/test.rs
+source: crates/ra_flycheck/src/conv/test.rs
 expression: diag
 ---
 [
diff --git a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_mismatched_type.snap b/crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_rustc_mismatched_type.snap
similarity index 96%
rename from crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_mismatched_type.snap
rename to crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_rustc_mismatched_type.snap
index 78b7f7cc83..28ebcb3b30 100644
--- a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_mismatched_type.snap
+++ b/crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_rustc_mismatched_type.snap
@@ -1,5 +1,5 @@
 ---
-source: crates/ra_cargo_watch/src/conv/test.rs
+source: crates/ra_flycheck/src/conv/test.rs
 expression: diag
 ---
 [
diff --git a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_unused_variable.snap b/crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_rustc_unused_variable.snap
similarity index 98%
rename from crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_unused_variable.snap
rename to crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_rustc_unused_variable.snap
index 5989ed2026..5e08732817 100644
--- a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_unused_variable.snap
+++ b/crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_rustc_unused_variable.snap
@@ -1,5 +1,5 @@
 ---
-source: crates/ra_cargo_watch/src/conv/test.rs
+source: crates/ra_flycheck/src/conv/test.rs
 expression: diag
 ---
 [
diff --git a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_wrong_number_of_parameters.snap b/crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_rustc_wrong_number_of_parameters.snap
similarity index 97%
rename from crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_wrong_number_of_parameters.snap
rename to crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_rustc_wrong_number_of_parameters.snap
index e34b546dc1..e500d3cd6c 100644
--- a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_rustc_wrong_number_of_parameters.snap
+++ b/crates/ra_flycheck/src/conv/snapshots/ra_flycheck__conv__test__snap_rustc_wrong_number_of_parameters.snap
@@ -1,5 +1,5 @@
 ---
-source: crates/ra_cargo_watch/src/conv/test.rs
+source: crates/ra_flycheck/src/conv/test.rs
 expression: diag
 ---
 [