libexpr: Migrate emitTreeAttrs to return a Value

Part of #1136 and progress towards #744

Change-Id: Iaa011161b26bda237bcf4424bf8262726a6a6964
This commit is contained in:
skye
2026-03-04 11:53:34 -05:00
parent 37ccd28c3b
commit 8b38edaf1e
3 changed files with 9 additions and 12 deletions
+5 -5
View File
@@ -14,13 +14,13 @@
namespace nix {
void emitTreeAttrs(
Value emitTreeAttrs(
Evaluator & state,
const fetchers::Tree & tree,
const fetchers::Input & input,
Value & v,
bool emptyRevFallback,
bool forceDirty)
bool forceDirty
)
{
assert(input.isLocked());
@@ -71,7 +71,7 @@ void emitTreeAttrs(
};
}
v = {NewValueAs::attrs, attrs};
return {NewValueAs::attrs, attrs};
}
std::string fixURI(std::string uri, EvalState & state, const std::string & defaultScheme = "file")
@@ -223,7 +223,7 @@ static void fetchTree(
state.ctx.paths.allowPath(tree.storePath);
emitTreeAttrs(state.ctx, tree, input2, v, params.emptyRevFallback, false);
v = emitTreeAttrs(state.ctx, tree, input2, params.emptyRevFallback, false);
}
void prim_fetchTree(EvalState & state, Value * * args, Value & v)