General code cleanup
This commit is contained in:
parent
0019fa8239
commit
c0107b21e0
2 changed files with 9 additions and 20 deletions
|
@ -166,7 +166,7 @@ impl Deployment {
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
// Do the whole eval-build-deploy flow
|
// Do the whole eval-build-deploy flow
|
||||||
let targets = mem::replace(&mut self.targets, HashMap::new());
|
let targets = mem::take(&mut self.targets);
|
||||||
let deployment = DeploymentHandle::new(self);
|
let deployment = DeploymentHandle::new(self);
|
||||||
let meta_future = meta.run(|meta| async move {
|
let meta_future = meta.run(|meta| async move {
|
||||||
match deployment.options.evaluator {
|
match deployment.options.evaluator {
|
||||||
|
@ -414,7 +414,7 @@ impl Deployment {
|
||||||
return Err(ColmenaError::Unsupported);
|
return Err(ColmenaError::Unsupported);
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut host = target.host.as_mut().unwrap();
|
let host = target.host.as_mut().unwrap();
|
||||||
host.set_job(Some(job.clone()));
|
host.set_job(Some(job.clone()));
|
||||||
|
|
||||||
host.copy_closure(
|
host.copy_closure(
|
||||||
|
@ -423,7 +423,7 @@ impl Deployment {
|
||||||
CopyOptions::default().include_outputs(true),
|
CopyOptions::default().include_outputs(true),
|
||||||
).await?;
|
).await?;
|
||||||
|
|
||||||
let profile = profile_drv.realize_remote(&mut host).await?;
|
let profile = profile_drv.realize_remote(host).await?;
|
||||||
|
|
||||||
job.success_with_message(format!("Built {:?} on target node", profile.as_path()))?;
|
job.success_with_message(format!("Built {:?} on target node", profile.as_path()))?;
|
||||||
Ok((target, profile))
|
Ok((target, profile))
|
||||||
|
@ -538,14 +538,12 @@ impl Deployment {
|
||||||
|
|
||||||
if profile.exists() {
|
if profile.exists() {
|
||||||
job.message("Remote profile known".to_string())?;
|
job.message("Remote profile known".to_string())?;
|
||||||
|
} else if arc_self.options.force_replace_unknown_profiles {
|
||||||
|
job.message("Warning: Remote profile is unknown, but unknown profiles are being ignored".to_string())?;
|
||||||
} else {
|
} else {
|
||||||
if arc_self.options.force_replace_unknown_profiles {
|
return Err(ColmenaError::ActiveProfileUnknown {
|
||||||
job.message("Warning: Remote profile is unknown, but unknown profiles are being ignored".to_string())?;
|
store_path: profile,
|
||||||
} else {
|
});
|
||||||
return Err(ColmenaError::ActiveProfileUnknown {
|
|
||||||
store_path: profile,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ pub struct NodeConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Nix options.
|
/// Nix options.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub struct NixOptions {
|
pub struct NixOptions {
|
||||||
/// Whether to pass --show-trace.
|
/// Whether to pass --show-trace.
|
||||||
show_trace: bool,
|
show_trace: bool,
|
||||||
|
@ -179,15 +179,6 @@ impl NodeConfig {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for NixOptions {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self {
|
|
||||||
show_trace: false,
|
|
||||||
builders: None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl NixOptions {
|
impl NixOptions {
|
||||||
pub fn set_show_trace(&mut self, show_trace: bool) {
|
pub fn set_show_trace(&mut self, show_trace: bool) {
|
||||||
self.show_trace = show_trace;
|
self.show_trace = show_trace;
|
||||||
|
|
Loading…
Reference in a new issue