From 793841a9b7b689e37c9a7902710aab2bd6a833d5 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Thu, 18 Apr 2024 18:05:33 +0200 Subject: [PATCH] fix drv.cc invalid output throw EvalState::error does not return an exception instance in lix, but an exception *builder*. throwing this thing will not trigger any catches, which then causes the worker process to die without reporting an error to the collector. this confuses the collector and causes *it* to exit, effectively breaking nix-eval-jobs for anything that has broken attrs. --- src/drv.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/drv.cc b/src/drv.cc index 7d1170b..c5e1339 100644 --- a/src/drv.cc +++ b/src/drv.cc @@ -50,8 +50,9 @@ Drv::Drv(std::string &attrPath, nix::EvalState &state, nix::DrvInfo &drvInfo, outputs[out.first] = localStore->printStorePath(*out.second); } } catch (const std::exception &e) { - throw state.error("derivation '%s' does not have valid outputs: %s", - attrPath, e.what()); + throw nix::EvalError(state, + "derivation '%s' does not have valid outputs: %s", + attrPath, e.what()); } if (args.meta) {