Skip to content

Commit b350b9f

Browse files
committed
Auto merge of #622 - Mark-Simulacrum:prune, r=Mark-Simulacrum
Remove dump-tasks-graph This isn't being used and will likely hurt the ability to refactor the task graph away from being an actual graph.
2 parents d681ea8 + 39666ac commit b350b9f

File tree

3 files changed

+1
-39
lines changed

3 files changed

+1
-39
lines changed

src/cli.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -306,17 +306,6 @@ pub enum Crater {
306306
no_default_capabilities: bool,
307307
},
308308

309-
#[structopt(
310-
name = "dump-tasks-graph",
311-
about = "dump the internal tasks graph in .dot format"
312-
)]
313-
DumpTasksGraph {
314-
#[structopt(name = "dest", parse(from_os_str))]
315-
dest: PathBuf,
316-
#[structopt(name = "experiment", long = "ex", default_value = "default")]
317-
ex: Ex,
318-
},
319-
320309
#[structopt(
321310
name = "check-config",
322311
about = "check if the config.toml file is valid"
@@ -628,16 +617,6 @@ impl Crater {
628617
.workspace(docker_env.as_ref().map(|s| s.as_str()), fast_workspace_init)?,
629618
)?;
630619
}
631-
Crater::DumpTasksGraph { ref dest, ref ex } => {
632-
let config = Config::load()?;
633-
let db = Database::open()?;
634-
635-
if let Some(experiment) = Experiment::get(&db, &ex.0)? {
636-
runner::dump_dot(&experiment, &experiment.get_crates(&db)?, &config, dest)?;
637-
} else {
638-
bail!("missing experiment: {}", ex.0);
639-
}
640-
}
641620
Crater::CheckConfig { ref filename } => {
642621
if let Err(ref e) = Config::check(filename) {
643622
bail!("check-config failed: {}", e);

src/runner/graph.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use crate::runner::{
2525
tasks::{Task, TaskStep},
2626
RunnerState,
2727
};
28-
use petgraph::{dot::Dot, graph::NodeIndex, stable_graph::StableDiGraph, Direction};
28+
use petgraph::{graph::NodeIndex, stable_graph::StableDiGraph, Direction};
2929
use std::fmt::{self, Debug};
3030
use std::sync::Arc;
3131

@@ -263,10 +263,6 @@ impl TasksGraph {
263263
pub(super) fn pending_crates_count(&self) -> usize {
264264
self.graph.neighbors(self.root).count()
265265
}
266-
267-
pub(super) fn generate_dot<'a>(&'a self) -> Dot<&'a StableDiGraph<impl Debug, ()>> {
268-
Dot::new(&self.graph)
269-
}
270266
}
271267

272268
pub(super) fn build_graph(ex: &Experiment, crates: &[Crate], config: &Config) -> TasksGraph {

src/runner/mod.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use crossbeam_utils::thread::{scope, ScopedJoinHandle};
1515
use rustwide::logging::LogStorage;
1616
use rustwide::Workspace;
1717
use std::collections::HashMap;
18-
use std::path::Path;
1918
use std::sync::{Condvar, Mutex};
2019
use std::time::Duration;
2120

@@ -196,15 +195,3 @@ where
196195
}
197196
clean_exit
198197
}
199-
200-
pub fn dump_dot(ex: &Experiment, crates: &[Crate], config: &Config, dest: &Path) -> Fallible<()> {
201-
info!("computing the tasks graph...");
202-
let graph = build_graph(ex, crates, config);
203-
204-
info!("dumping the tasks graph...");
205-
::std::fs::write(dest, format!("{:?}", graph.generate_dot()).as_bytes())?;
206-
207-
info!("tasks graph available in {}", dest.to_string_lossy());
208-
209-
Ok(())
210-
}

0 commit comments

Comments
 (0)