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

remove 'debugError', dead code

This commit is contained in:
Ben Burdette 2022-04-08 13:30:18 -06:00
parent b8b8ec7101
commit a86c2a8481
3 changed files with 1 additions and 46 deletions

View file

@ -50,7 +50,6 @@ struct NixRepl
ref<EvalState> state;
Bindings * autoArgs;
const Error *debugError;
int debugTraceIndex;
Strings loadedFiles;
@ -552,16 +551,6 @@ bool NixRepl::processLine(std::string line)
// showDebugTrace(std::cout, *iter);
}
}
else if (arg == "error") {
// TODO: remove, along with debugError.
if (this->debugError) {
showErrorInfo(std::cout, debugError->info(), true);
}
else
{
notice("error information not available");
}
}
else if (arg == "step") {
// set flag to stop at next DebugTrace; exit repl.
state->debugStop = true;
@ -1024,26 +1013,18 @@ std::ostream & NixRepl::printValue(std::ostream & str, Value & v, unsigned int m
void runRepl(
ref<EvalState> evalState,
const Error *debugError,
const Expr &expr,
const std::map<std::string, Value *> & extraEnv)
{
auto repl = std::make_unique<NixRepl>(evalState);
repl->debugError = debugError;
repl->initEnv();
// add 'extra' vars.
// std::set<std::string> names;
for (auto & [name, value] : extraEnv) {
// names.insert(ANSI_BOLD + name + ANSI_NORMAL);
// names.insert(name);
repl->addVarToScope(repl->state->symbols.create(name), *value);
}
// printError(hintfmt("The following extra variables are in scope: %s\n", concatStringsSep(", ", names)).str());
repl->mainLoop({});
}