diff options
author | David Wood <[email protected]> | 2019-03-05 21:29:23 +0000 |
---|---|---|
committer | David Wood <[email protected]> | 2019-03-07 00:05:03 +0000 |
commit | 00d927a1885ec2938d3365a8e136993445b437f5 (patch) | |
tree | e60f63e68def477d5b7ceb39dcc965ff128d6e19 /crates/ra_lsp_server/tests/heavy_tests/support.rs | |
parent | b1a1d20e067c25fb80fbab43b2956b6747a8dd3c (diff) |
Initial implementation of project-lock.json.
This commit adds a initial implementation of project-lock.json, a build
system agnostic method of specifying the crate graph and roots.
Diffstat (limited to 'crates/ra_lsp_server/tests/heavy_tests/support.rs')
-rw-r--r-- | crates/ra_lsp_server/tests/heavy_tests/support.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_lsp_server/tests/heavy_tests/support.rs b/crates/ra_lsp_server/tests/heavy_tests/support.rs index 8bfc8d622..e02d7858e 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/support.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/support.rs | |||
@@ -27,12 +27,16 @@ use ra_lsp_server::{ | |||
27 | }; | 27 | }; |
28 | 28 | ||
29 | pub fn project(fixture: &str) -> Server { | 29 | pub fn project(fixture: &str) -> Server { |
30 | let tmp_dir = TempDir::new().unwrap(); | ||
31 | project_with_tmpdir(tmp_dir, fixture) | ||
32 | } | ||
33 | |||
34 | pub fn project_with_tmpdir(tmp_dir: TempDir, fixture: &str) -> Server { | ||
30 | static INIT: Once = Once::new(); | 35 | static INIT: Once = Once::new(); |
31 | INIT.call_once(|| { | 36 | INIT.call_once(|| { |
32 | let _ = Logger::with_env_or_str(crate::LOG).start().unwrap(); | 37 | let _ = Logger::with_env_or_str(crate::LOG).start().unwrap(); |
33 | }); | 38 | }); |
34 | 39 | ||
35 | let tmp_dir = TempDir::new().unwrap(); | ||
36 | let mut paths = vec![]; | 40 | let mut paths = vec![]; |
37 | 41 | ||
38 | for entry in parse_fixture(fixture) { | 42 | for entry in parse_fixture(fixture) { |