Skip to content

Commit

Permalink
can eval nixos system
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorBaker committed Oct 30, 2024
1 parent 8e59ade commit 2472581
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/libexpr/eval.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1898,7 +1898,13 @@ void ExprOpConcatLists::eval(EvalState & state, Env & env, Value & v)
e1->eval(state, env, *v1);
auto v2 = state.allocValue();
e2->eval(state, env, *v2);
state.concatLists(v, ValueList({v1, v2}), pos, "while evaluating one of the elements to concatenate");
// TODO(@connorbaker): This kills me -- why do we need to create the list on the heap? Shouldn't I be able to pass
// a ValueList by value to concatLists without worrying about it being garbage collected *while the function is running*?
// If this doesn't work, then should I allocList in the test cases?
auto list = state.allocList();
*list = list->push_back(v1);
*list = list->push_back(v2);
state.concatLists(v, *list, pos, "while evaluating one of the elements to concatenate");
}


Expand Down

0 comments on commit 2472581

Please sign in to comment.