From a1c33c2e1ab3b10c0e3a9c18db955492e94f690b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 1 Jan 2022 19:10:34 +0300 Subject: [PATCH] test: force client-side watching The direct reason for this is to fix CI on windows, which seems to fail for some reason after we fixed the watcher-selection logic which (I think) changed the tests behavior to use notify rather than client. But this patch seems to make sense in general -- file watching is notoriously finicky, so controlling it explicitly leads to less fragile tests. --- crates/rust-analyzer/tests/slow-tests/support.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/rust-analyzer/tests/slow-tests/support.rs b/crates/rust-analyzer/tests/slow-tests/support.rs index a8c2a5bb61..6e7ecec5b2 100644 --- a/crates/rust-analyzer/tests/slow-tests/support.rs +++ b/crates/rust-analyzer/tests/slow-tests/support.rs @@ -101,6 +101,14 @@ impl<'a> Project<'a> { let mut config = Config::new( tmp_dir_path, lsp_types::ClientCapabilities { + workspace: Some(lsp_types::WorkspaceClientCapabilities { + did_change_watched_files: Some( + lsp_types::DidChangeWatchedFilesClientCapabilities { + dynamic_registration: Some(true), + }, + ), + ..Default::default() + }), text_document: Some(lsp_types::TextDocumentClientCapabilities { definition: Some(lsp_types::GotoCapability { link_support: Some(true),