diff options
author | Robert Hensing <robert@roberthensing.nl> | 2023-01-18 01:19:07 +0100 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2023-01-18 01:34:07 +0100 |
commit | 9b33ef3879a764bed4cc2404a08344c3a697a646 (patch) | |
tree | d6921123c18a9077d2f897999e3a1445d1738502 /src/libcmd/repl.cc | |
parent | 98f57f44bbeca3b555bd732771eac4c07d54576b (diff) |
Revert "Merge pull request #6204 from layus/coerce-string"
This reverts commit a75b7ba30f1e4f8b15e810fd18e63ee9552e0815, reversing
changes made to 9af16c5f742300e831a2cc400e43df1e22f87f31.
Diffstat (limited to 'src/libcmd/repl.cc')
-rw-r--r-- | src/libcmd/repl.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc index 9b12f8fa2..b7f691808 100644 --- a/src/libcmd/repl.cc +++ b/src/libcmd/repl.cc @@ -397,7 +397,7 @@ StringSet NixRepl::completePrefix(const std::string & prefix) Expr * e = parseString(expr); Value v; e->eval(*state, *env, v); - state->forceAttrs(v, noPos, "nevermind, it is ignored anyway"); + state->forceAttrs(v, noPos); for (auto & i : *v.attrs) { std::string_view name = state->symbols[i.name]; @@ -590,7 +590,7 @@ bool NixRepl::processLine(std::string line) const auto [path, line] = [&] () -> std::pair<Path, uint32_t> { if (v.type() == nPath || v.type() == nString) { PathSet context; - auto path = state->coerceToPath(noPos, v, context, "while evaluating the filename to edit"); + auto path = state->coerceToPath(noPos, v, context); return {path, 0}; } else if (v.isLambda()) { auto pos = state->positions[v.lambda.fun->pos]; @@ -839,7 +839,7 @@ void NixRepl::loadFiles() void NixRepl::addAttrsToScope(Value & attrs) { - state->forceAttrs(attrs, [&]() { return attrs.determinePos(noPos); }, "while evaluating an attribute set to be merged in the global scope"); + state->forceAttrs(attrs, [&]() { return attrs.determinePos(noPos); }); if (displ + attrs.attrs->size() >= envSize) throw Error("environment full; cannot add more variables"); @@ -944,7 +944,7 @@ std::ostream & NixRepl::printValue(std::ostream & str, Value & v, unsigned int m Bindings::iterator i = v.attrs->find(state->sDrvPath); PathSet context; if (i != v.attrs->end()) - str << state->store->printStorePath(state->coerceToStorePath(i->pos, *i->value, context, "while evaluating the drvPath of a derivation")); + str << state->store->printStorePath(state->coerceToStorePath(i->pos, *i->value, context)); else str << "???"; str << "ยป"; |