1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00

Merge pull request #10305 from hercules-ci/addErrorContext-is-great

Always print addErrorContext
This commit is contained in:
Théophane Hufschmitt 2024-03-29 09:10:09 +01:00 committed by GitHub
commit de101417eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 96 additions and 20 deletions

View file

@ -826,7 +826,7 @@ static void prim_addErrorContext(EvalState & state, const PosIdx pos, Value * *
auto message = state.coerceToString(pos, *args[0], context,
"while evaluating the error message passed to builtins.addErrorContext",
false, false).toOwned();
e.addTrace(nullptr, HintFmt(message));
e.addTrace(nullptr, HintFmt(message), TracePrint::Always);
throw;
}
}
@ -834,6 +834,8 @@ static void prim_addErrorContext(EvalState & state, const PosIdx pos, Value * *
static RegisterPrimOp primop_addErrorContext(PrimOp {
.name = "__addErrorContext",
.arity = 2,
// The normal trace item is redundant
.addTrace = false,
.fun = prim_addErrorContext,
});