Update config usage in slow tests
This commit is contained in:
parent
3d17261972
commit
9fe1b24736
@ -525,6 +525,7 @@ pub struct ClientCommandsConfig {
|
|||||||
pub trigger_parameter_hints: bool,
|
pub trigger_parameter_hints: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct ConfigUpdateError {
|
pub struct ConfigUpdateError {
|
||||||
errors: Vec<(String, serde_json::Error)>,
|
errors: Vec<(String, serde_json::Error)>,
|
||||||
}
|
}
|
||||||
@ -1442,7 +1443,6 @@ fn get_field<T: DeserializeOwned>(
|
|||||||
default: &str,
|
default: &str,
|
||||||
) -> T {
|
) -> T {
|
||||||
let default = serde_json::from_str(default).unwrap();
|
let default = serde_json::from_str(default).unwrap();
|
||||||
|
|
||||||
// XXX: check alias first, to work-around the VS Code where it pre-fills the
|
// XXX: check alias first, to work-around the VS Code where it pre-fills the
|
||||||
// defaults instead of sending an empty object.
|
// defaults instead of sending an empty object.
|
||||||
alias
|
alias
|
||||||
|
@ -685,7 +685,7 @@ version = \"0.0.0\"
|
|||||||
#[test]
|
#[test]
|
||||||
fn out_dirs_check() {
|
fn out_dirs_check() {
|
||||||
if skip_slow_tests() {
|
if skip_slow_tests() {
|
||||||
return;
|
// return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let server = Project::with_fixture(
|
let server = Project::with_fixture(
|
||||||
@ -737,7 +737,9 @@ fn main() {
|
|||||||
)
|
)
|
||||||
.with_config(serde_json::json!({
|
.with_config(serde_json::json!({
|
||||||
"cargo": {
|
"cargo": {
|
||||||
"loadOutDirsFromCheck": true,
|
"buildScripts": {
|
||||||
|
"enable": true
|
||||||
|
},
|
||||||
"noSysroot": true,
|
"noSysroot": true,
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
@ -890,7 +892,9 @@ pub fn foo(_input: TokenStream) -> TokenStream {
|
|||||||
)
|
)
|
||||||
.with_config(serde_json::json!({
|
.with_config(serde_json::json!({
|
||||||
"cargo": {
|
"cargo": {
|
||||||
"loadOutDirsFromCheck": true,
|
"buildScripts": {
|
||||||
|
"enable": true
|
||||||
|
},
|
||||||
"noSysroot": true,
|
"noSysroot": true,
|
||||||
},
|
},
|
||||||
"procMacro": {
|
"procMacro": {
|
||||||
|
@ -36,7 +36,9 @@ impl<'a> Project<'a> {
|
|||||||
// Loading standard library is costly, let's ignore it by default
|
// Loading standard library is costly, let's ignore it by default
|
||||||
"noSysroot": true,
|
"noSysroot": true,
|
||||||
// Can't use test binary as rustc wrapper.
|
// Can't use test binary as rustc wrapper.
|
||||||
"useRustcWrapperForBuildScripts": false,
|
"buildScripts": {
|
||||||
|
"useRustcWrapper": false
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
@ -137,7 +139,7 @@ impl<'a> Project<'a> {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
config.discovered_projects = Some(discovered_projects);
|
config.discovered_projects = Some(discovered_projects);
|
||||||
let _ = config.update(self.config);
|
config.update(self.config).expect("invalid config");
|
||||||
|
|
||||||
Server::new(tmp_dir, config)
|
Server::new(tmp_dir, config)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user