* Support singleton values and nested lists again in `args', but print
a warning.
This commit is contained in:
parent
2132d9ddeb
commit
547b119f25
|
@ -269,7 +269,11 @@ static Expr primDerivationStrict(EvalState & state, const ATermVector & args)
|
||||||
if (key == "args") {
|
if (key == "args") {
|
||||||
ATermList es;
|
ATermList es;
|
||||||
value = evalExpr(state, value);
|
value = evalExpr(state, value);
|
||||||
if (!matchList(value, es)) throw Error(format("`args' should be a list %1%") % value);
|
if (!matchList(value, es)) {
|
||||||
|
static bool haveWarned = false;
|
||||||
|
warnOnce(haveWarned, "the `args' attribute should evaluate to a list");
|
||||||
|
es = flattenList(state, value);
|
||||||
|
}
|
||||||
for (ATermIterator i(es); i; ++i) {
|
for (ATermIterator i(es); i; ++i) {
|
||||||
string s;
|
string s;
|
||||||
toString(state, *i, context, s);
|
toString(state, *i, context, s);
|
||||||
|
|
|
@ -44,13 +44,10 @@ Path makeRootName(const Path & gcRoot, int & counter)
|
||||||
|
|
||||||
void printGCWarning()
|
void printGCWarning()
|
||||||
{
|
{
|
||||||
static bool warned = false;
|
static bool haveWarned = false;
|
||||||
if (!warned) {
|
warnOnce(haveWarned,
|
||||||
printMsg(lvlInfo,
|
"warning: you did not specify `--add-root'; "
|
||||||
"warning: you did not specify `--add-root'; "
|
"the result might be removed by the garbage collector");
|
||||||
"the result might be removed by the garbage collector");
|
|
||||||
warned = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue