1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 14:53:16 +02:00

Merge remote-tracking branch 'origin/master' into lazy-trees

This commit is contained in:
Eelco Dolstra 2022-12-14 14:02:36 +01:00
commit 8becbb063a
15 changed files with 213 additions and 105 deletions

View file

@ -46,7 +46,7 @@ static char * allocString(size_t size)
#if HAVE_BOEHMGC
t = (char *) GC_MALLOC_ATOMIC(size);
#else
t = malloc(size);
t = (char *) malloc(size);
#endif
if (!t) throw std::bad_alloc();
return t;
@ -494,9 +494,6 @@ EvalState::EvalState(
#if HAVE_BOEHMGC
, valueAllocCache(std::allocate_shared<void *>(traceable_allocator<void *>(), nullptr))
, env1AllocCache(std::allocate_shared<void *>(traceable_allocator<void *>(), nullptr))
#else
, valueAllocCache(std::make_shared<void *>(nullptr))
, env1AllocCache(std::make_shared<void *>(nullptr))
#endif
, virtualPathMarker(settings.nixStore + "/virtual00000000000000000")
, baseEnv(allocEnv(128))
@ -1617,7 +1614,7 @@ void EvalState::callFunction(Value & fun, size_t nrArgs, Value * * args, Value &
? concatStrings("'", symbols[lambda.name], "'")
: "anonymous lambda"));
if (pos != noPos)
addErrorTrace(e, pos, "from call site", "");
addErrorTrace(e, pos, "while evaluating call site%s", "");
}
throw;
}

View file

@ -89,7 +89,7 @@ static FlakeInput parseFlakeInput(
} catch (Error & e) {
e.addTrace(
state.positions[attr.pos],
hintfmt("in flake attribute '%s'", state.symbols[attr.name]));
hintfmt("while evaluating flake attribute '%s'", state.symbols[attr.name]));
throw;
}
}
@ -98,7 +98,7 @@ static FlakeInput parseFlakeInput(
try {
input.ref = FlakeRef::fromAttrs(attrs);
} catch (Error & e) {
e.addTrace(state.positions[pos], hintfmt("in flake input"));
e.addTrace(state.positions[pos], hintfmt("while evaluating flake input"));
throw;
}
else {