mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
de-const evalState exceptions
This commit is contained in:
parent
f9cdb6af8d
commit
7ddef73d02
7 changed files with 54 additions and 50 deletions
|
@ -118,9 +118,10 @@ ref<EvalState> EvalCommand::getEvalState()
|
|||
searchPath, getEvalStore(), getStore())
|
||||
#endif
|
||||
;
|
||||
// TODO move this somewhere else. Its only here to get the evalState ptr!
|
||||
if (startReplOnEvalErrors)
|
||||
// debuggerHook = [evalState{ref<EvalState>(evalState)}](const Error * error, const Env & env, const Expr & expr) {
|
||||
debuggerHook = [](const EvalState & evalState, const Error * error, const Env & env, const Expr & expr) {
|
||||
debuggerHook = [](EvalState & evalState, const Error * error, const Env & env, const Expr & expr) {
|
||||
auto dts =
|
||||
error && expr.getPos()
|
||||
? std::make_unique<DebugTraceStacker>(
|
||||
|
@ -137,9 +138,9 @@ ref<EvalState> EvalCommand::getEvalState()
|
|||
if (error)
|
||||
printError("%s\n\n" ANSI_BOLD "Starting REPL to allow you to inspect the current state of the evaluator.\n" ANSI_NORMAL, error->what());
|
||||
|
||||
auto se = evalState->getStaticEnv(expr);
|
||||
auto se = evalState.getStaticEnv(expr);
|
||||
if (se) {
|
||||
auto vm = mapStaticEnvBindings(evalState->symbols, *se.get(), env);
|
||||
auto vm = mapStaticEnvBindings(evalState.symbols, *se.get(), env);
|
||||
runRepl(evalState, *vm);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue