Fix build
This commit is contained in:
@ -109,7 +109,7 @@ static void worker(
|
||||
nlohmann::json reply;
|
||||
|
||||
try {
|
||||
auto v = findAlongAttrPath(state, attrPath, autoArgs, *vRoot).first;
|
||||
auto v = findAlongAttrPath(state, attrPath, autoArgs, *vRoot);
|
||||
|
||||
state.forceValue(*v);
|
||||
|
||||
@ -138,23 +138,23 @@ static void worker(
|
||||
|
||||
/* If this is an aggregate, then get its constituents. */
|
||||
auto a = v->attrs->get(state.symbols.create("_hydraAggregate"));
|
||||
if (a && state.forceBool(*a->value, *a->pos)) {
|
||||
if (a && state.forceBool(*(*a)->value, *(*a)->pos)) {
|
||||
auto a = v->attrs->get(state.symbols.create("constituents"));
|
||||
if (!a)
|
||||
throw EvalError("derivation must have a ‘constituents’ attribute");
|
||||
|
||||
|
||||
PathSet context;
|
||||
state.coerceToString(*a->pos, *a->value, context, true, false);
|
||||
state.coerceToString(*(*a)->pos, *(*a)->value, context, true, false);
|
||||
for (auto & i : context)
|
||||
if (i.at(0) == '!') {
|
||||
size_t index = i.find("!", 1);
|
||||
job["constituents"].push_back(string(i, index + 1));
|
||||
}
|
||||
|
||||
state.forceList(*a->value, *a->pos);
|
||||
for (unsigned int n = 0; n < a->value->listSize(); ++n) {
|
||||
auto v = a->value->listElems()[n];
|
||||
state.forceList(*(*a)->value, *(*a)->pos);
|
||||
for (unsigned int n = 0; n < (*a)->value->listSize(); ++n) {
|
||||
auto v = (*a)->value->listElems()[n];
|
||||
state.forceValue(*v);
|
||||
if (v->type == tString)
|
||||
job["namedConstituents"].push_back(state.forceStringNoCtx(*v));
|
||||
|
Reference in New Issue
Block a user