From f1fbce3d224864c8ba04c15e2f41853e347933f9 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Thu, 25 Jul 2024 08:12:09 +0530 Subject: solver_highs: implement --solver-report --- src/solver_highs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/solver_highs.c b/src/solver_highs.c index a56dbd8..5f96ea1 100644 --- a/src/solver_highs.c +++ b/src/solver_highs.c @@ -191,6 +191,7 @@ int solver_highs(struct job **job, struct job_clist *q, int32_t resources) static bool solved = false; struct jobid *jobid = NULL; double *solution = NULL; + struct job *j; int ret = 0; if (solved) @@ -216,6 +217,15 @@ int solver_highs(struct job **job, struct job_clist *q, int32_t resources) job_stale_set(jobid->jobs[i]); } + if (evanix_opts.solver_report) { + CIRCLEQ_FOREACH (j, q, clist) { + if (j->stale) { + printf("❌ refusing to build %s, cost: %d\n", + j->drv_path, job_cost_recursive(j)); + } + } + } + solved = true; out_free_jobid: jobid_free(jobid); -- cgit v1.2.3