aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops/context.cc
diff options
context:
space:
mode:
authorGuillaume Maudoux <guillaume.maudoux@tweag.io>2022-03-18 01:10:04 +0100
committerGuillaume Maudoux <guillaume.maudoux@tweag.io>2022-03-18 01:10:04 +0100
commit1942fed6d9cee95775046c5ad3d253ab2e8ab210 (patch)
treea9e43fb6876395a828221c871f57ed325dc90205 /src/libexpr/primops/context.cc
parente6d07e0d89d964cde22894fca57a95177c085c8d (diff)
Revert extra colon at end os strings
Diffstat (limited to 'src/libexpr/primops/context.cc')
-rw-r--r--src/libexpr/primops/context.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libexpr/primops/context.cc b/src/libexpr/primops/context.cc
index 222d183e4..78320dc09 100644
--- a/src/libexpr/primops/context.cc
+++ b/src/libexpr/primops/context.cc
@@ -7,7 +7,7 @@ namespace nix {
static void prim_unsafeDiscardStringContext(EvalState & state, const Pos & pos, Value * * args, Value & v)
{
PathSet context;
- auto s = state.coerceToString(pos, *args[0], context, "While evaluating the argument passed to builtins.unsafeDiscardStringContext: ");
+ auto s = state.coerceToString(pos, *args[0], context, "While evaluating the argument passed to builtins.unsafeDiscardStringContext");
v.mkString(*s);
}
@@ -17,7 +17,7 @@ static RegisterPrimOp primop_unsafeDiscardStringContext("__unsafeDiscardStringCo
static void prim_hasContext(EvalState & state, const Pos & pos, Value * * args, Value & v)
{
PathSet context;
- state.forceString(*args[0], context, pos, "While evaluating the argument passed to builtins.hasContext: ");
+ state.forceString(*args[0], context, pos, "While evaluating the argument passed to builtins.hasContext");
v.mkBool(!context.empty());
}
@@ -33,7 +33,7 @@ static RegisterPrimOp primop_hasContext("__hasContext", 1, prim_hasContext);
static void prim_unsafeDiscardOutputDependency(EvalState & state, const Pos & pos, Value * * args, Value & v)
{
PathSet context;
- auto s = state.coerceToString(pos, *args[0], context, "While evaluating the argument passed to builtins.unsafeDiscardOutputDependency: ");
+ auto s = state.coerceToString(pos, *args[0], context, "While evaluating the argument passed to builtins.unsafeDiscardOutputDependency");
PathSet context2;
for (auto & p : context)
@@ -72,7 +72,7 @@ static void prim_getContext(EvalState & state, const Pos & pos, Value * * args,
Strings outputs;
};
PathSet context;
- state.forceString(*args[0], context, pos, "While evaluating the argument passed to builtins.getContext: ");
+ state.forceString(*args[0], context, pos, "While evaluating the argument passed to builtins.getContext");
auto contextInfos = std::map<Path, ContextInfo>();
for (const auto & p : context) {
Path drv;
@@ -136,9 +136,9 @@ static RegisterPrimOp primop_getContext("__getContext", 1, prim_getContext);
static void prim_appendContext(EvalState & state, const Pos & pos, Value * * args, Value & v)
{
PathSet context;
- auto orig = state.forceString(*args[0], context, pos, "while evaluating the first argument passed to builtins.appendContext: ");
+ auto orig = state.forceString(*args[0], context, pos, "while evaluating the first argument passed to builtins.appendContext");
- state.forceAttrs(*args[1], pos, "While evaluating the second argument passed to builtins.appendContext: ");
+ state.forceAttrs(*args[1], pos, "While evaluating the second argument passed to builtins.appendContext");
auto sPath = state.symbols.create("path");
auto sAllOutputs = state.symbols.create("allOutputs");
@@ -150,16 +150,16 @@ static void prim_appendContext(EvalState & state, const Pos & pos, Value * * arg
});
if (!settings.readOnlyMode)
state.store->ensurePath(state.store->parseStorePath(i.name));
- state.forceAttrs(*i.value, *i.pos, "While evaluating the value of a string context: ");
+ state.forceAttrs(*i.value, *i.pos, "While evaluating the value of a string context");
auto iter = i.value->attrs->find(sPath);
if (iter != i.value->attrs->end()) {
- if (state.forceBool(*iter->value, *iter->pos, "While evaluating the `path` attribute of a string context: "))
+ if (state.forceBool(*iter->value, *iter->pos, "While evaluating the `path` attribute of a string context"))
context.insert(i.name);
}
iter = i.value->attrs->find(sAllOutputs);
if (iter != i.value->attrs->end()) {
- if (state.forceBool(*iter->value, *iter->pos, "While evaluating the `allOutputs` attribute of a string context: ")) {
+ if (state.forceBool(*iter->value, *iter->pos, "While evaluating the `allOutputs` attribute of a string context")) {
if (!isDerivation(i.name)) {
throw EvalError({
.msg = hintfmt("Tried to add all-outputs context of %s, which is not a derivation, to a string", i.name),
@@ -172,7 +172,7 @@ static void prim_appendContext(EvalState & state, const Pos & pos, Value * * arg
iter = i.value->attrs->find(state.sOutputs);
if (iter != i.value->attrs->end()) {
- state.forceList(*iter->value, *iter->pos, "While evaluating the `outputs` attribute of a string context: ");
+ state.forceList(*iter->value, *iter->pos, "While evaluating the `outputs` attribute of a string context");
if (iter->value->listSize() && !isDerivation(i.name)) {
throw EvalError({
.msg = hintfmt("Tried to add derivation output context of %s, which is not a derivation, to a string", i.name),
@@ -180,7 +180,7 @@ static void prim_appendContext(EvalState & state, const Pos & pos, Value * * arg
});
}
for (auto elem : iter->value->listItems()) {
- auto name = state.forceStringNoCtx(*elem, *iter->pos, "While evaluating an output name within a string context: ");
+ auto name = state.forceStringNoCtx(*elem, *iter->pos, "While evaluating an output name within a string context");
context.insert(concatStrings("!", name, "!", i.name));
}
}