Skip to content

Commit a1c33c2

Browse files
committed
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.
1 parent 0d1e23e commit a1c33c2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

crates/rust-analyzer/tests/slow-tests/support.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,14 @@ impl<'a> Project<'a> {
101101
let mut config = Config::new(
102102
tmp_dir_path,
103103
lsp_types::ClientCapabilities {
104+
workspace: Some(lsp_types::WorkspaceClientCapabilities {
105+
did_change_watched_files: Some(
106+
lsp_types::DidChangeWatchedFilesClientCapabilities {
107+
dynamic_registration: Some(true),
108+
},
109+
),
110+
..Default::default()
111+
}),
104112
text_document: Some(lsp_types::TextDocumentClientCapabilities {
105113
definition: Some(lsp_types::GotoCapability {
106114
link_support: Some(true),

0 commit comments

Comments
 (0)