forked from lix-project/lix
libstore: print dependency errors from DerivationGoal
this is not ideal, but it's better than having this stuck in the worker
loop itself. setting ex on all failing goals is not problematic because
only toplevel goals can ever be observable, all the others are ignored.
notably only derivation goals ever set `ex`, substitution goals do not.
Change-Id: I02e2164487b2955df053fef3c8e774d557aa638a
This commit is contained in:
parent
869666cb65
commit
e55ec75619
|
@ -1544,6 +1544,10 @@ Goal::Finished DerivationGoal::done(
|
|||
fs << worker.store.printStorePath(drvPath) << "\t" << buildResult.toString() << std::endl;
|
||||
}
|
||||
|
||||
if (ex && isDependency) {
|
||||
logError(ex->info());
|
||||
}
|
||||
|
||||
return Finished{
|
||||
.result = buildResult.success() ? ecSuccess : ecFailed,
|
||||
.ex = ex ? std::make_shared<Error>(std::move(*ex)) : nullptr,
|
||||
|
|
|
@ -157,19 +157,13 @@ void Worker::goalFinished(GoalPtr goal, Goal::Finished & f)
|
|||
goal->trace("done");
|
||||
assert(!goal->exitCode.has_value());
|
||||
goal->exitCode = f.result;
|
||||
goal->ex = f.ex;
|
||||
|
||||
permanentFailure |= f.permanentFailure;
|
||||
timedOut |= f.timedOut;
|
||||
hashMismatch |= f.hashMismatch;
|
||||
checkMismatch |= f.checkMismatch;
|
||||
|
||||
if (f.ex) {
|
||||
if (!goal->waiters.empty())
|
||||
logError(f.ex->info());
|
||||
else
|
||||
goal->ex = f.ex;
|
||||
}
|
||||
|
||||
for (auto & i : goal->waiters) {
|
||||
if (GoalPtr waiting = i.lock()) {
|
||||
assert(waiting->waitees.count(goal));
|
||||
|
|
Loading…
Reference in a new issue