mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02:00
fix merge issues
This commit is contained in:
parent
64c4ba8f66
commit
e82aec4efc
5 changed files with 16 additions and 21 deletions
|
@ -68,7 +68,7 @@ extern std::function<void(const Error & error, const Env & env, const Expr & exp
|
|||
ref<EvalState> EvalCommand::getEvalState()
|
||||
{
|
||||
if (!evalState) {
|
||||
evalState = std::make_shared<EvalState>(searchPath, getStore());
|
||||
evalState = std::make_shared<EvalState>(searchPath, getEvalStore(), getStore());
|
||||
if (startReplOnEvalErrors)
|
||||
debuggerHook = [evalState{ref<EvalState>(evalState)}](const Error & error, const Env & env, const Expr & expr) {
|
||||
printError("%s\n\n" ANSI_BOLD "Starting REPL to allow you to inspect the current state of the evaluator.\n" ANSI_NORMAL, error.what());
|
||||
|
@ -102,13 +102,6 @@ ref<Store> EvalCommand::getEvalStore()
|
|||
return ref<Store>(evalStore);
|
||||
}
|
||||
|
||||
ref<EvalState> EvalCommand::getEvalState()
|
||||
{
|
||||
if (!evalState)
|
||||
evalState = std::make_shared<EvalState>(searchPath, getEvalStore(), getStore());
|
||||
return ref<EvalState>(evalState);
|
||||
}
|
||||
|
||||
BuiltPathsCommand::BuiltPathsCommand(bool recursive)
|
||||
: recursive(recursive)
|
||||
{
|
||||
|
|
|
@ -205,6 +205,7 @@ void NixRepl::mainLoop(const std::vector<std::string> & files)
|
|||
if (!files.empty()) {
|
||||
for (auto & i : files)
|
||||
loadedFiles.push_back(i);
|
||||
}
|
||||
|
||||
reloadFiles();
|
||||
if (!loadedFiles.empty()) notice("");
|
||||
|
@ -639,7 +640,7 @@ void NixRepl::addAttrsToScope(Value & attrs)
|
|||
{
|
||||
state->forceAttrs(attrs);
|
||||
for (auto & i : *attrs.attrs)
|
||||
addVarToScope(i.name, *i.value);
|
||||
addVarToScope(i.name, i.value);
|
||||
notice("Added %1% variables.", attrs.attrs->size());
|
||||
}
|
||||
|
||||
|
@ -650,7 +651,7 @@ void NixRepl::addVarToScope(const Symbol & name, Value * v)
|
|||
throw Error("environment full; cannot add more variables");
|
||||
staticEnv->vars.emplace_back(name, displ);
|
||||
staticEnv->sort();
|
||||
env->values[displ++] = &v;
|
||||
env->values[displ++] = v;
|
||||
varNames.insert((string) name);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue