Skip to content

Commit 1f5ae35

Browse files
committed
Update config usage in slow tests
1 parent e91b83f commit 1f5ae35

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ pub struct ClientCommandsConfig {
525525
pub trigger_parameter_hints: bool,
526526
}
527527

528+
#[derive(Debug)]
528529
pub struct ConfigUpdateError {
529530
errors: Vec<(String, serde_json::Error)>,
530531
}
@@ -1437,7 +1438,6 @@ fn get_field<T: DeserializeOwned>(
14371438
default: &str,
14381439
) -> T {
14391440
let default = serde_json::from_str(default).unwrap();
1440-
14411441
// XXX: check alias first, to work-around the VS Code where it pre-fills the
14421442
// defaults instead of sending an empty object.
14431443
alias

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ version = \"0.0.0\"
685685
#[test]
686686
fn out_dirs_check() {
687687
if skip_slow_tests() {
688-
return;
688+
// return;
689689
}
690690

691691
let server = Project::with_fixture(
@@ -737,7 +737,9 @@ fn main() {
737737
)
738738
.with_config(serde_json::json!({
739739
"cargo": {
740-
"loadOutDirsFromCheck": true,
740+
"buildScripts": {
741+
"enable": true
742+
},
741743
"noSysroot": true,
742744
}
743745
}))
@@ -890,7 +892,9 @@ pub fn foo(_input: TokenStream) -> TokenStream {
890892
)
891893
.with_config(serde_json::json!({
892894
"cargo": {
893-
"loadOutDirsFromCheck": true,
895+
"buildScripts": {
896+
"enable": true
897+
},
894898
"noSysroot": true,
895899
},
896900
"procMacro": {

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ impl<'a> Project<'a> {
3636
// Loading standard library is costly, let's ignore it by default
3737
"noSysroot": true,
3838
// Can't use test binary as rustc wrapper.
39-
"useRustcWrapperForBuildScripts": false,
39+
"buildScripts": {
40+
"useRustcWrapper": false
41+
},
4042
}
4143
}),
4244
}
@@ -137,7 +139,7 @@ impl<'a> Project<'a> {
137139
},
138140
);
139141
config.discovered_projects = Some(discovered_projects);
140-
let _ = config.update(self.config);
142+
config.update(self.config).expect("invalid config");
141143

142144
Server::new(tmp_dir, config)
143145
}

0 commit comments

Comments
 (0)