Skip to content

Commit

Permalink
leak dag
Browse files Browse the repository at this point in the history
  • Loading branch information
viperML committed Jul 3, 2023
1 parent f758ce5 commit 0c0b948
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ impl Args {
async fn _main(&self) -> Result<()> {
let root_node = self.unit_ref.ref_to_unit()?;
let (dag, _) = eval::dag(root_node.clone())?;
let dag: &'static mut _ = Box::leak(Box::new(dag));

let db_conn = Arc::new(Mutex::new(crate::db::DbConnection::new()?));

Expand Down Expand Up @@ -155,9 +156,9 @@ impl Args {

let task_status = if all_deps_built && can_add_to_tasks {
let _db_conn = db_conn.clone();
let unit = unit.clone();
// let unit = unit.clone();
let rebuild = match (self, &unit) {
(Args { rebuild: true, .. }, _) => unit == root_node,
(Args { rebuild: true, .. }, _) => unit == &root_node,
(
Args {
rebuild_all: true, ..
Expand Down

0 comments on commit 0c0b948

Please sign in to comment.