fix(3p/nix): Update for usage of new attribute set API
The new attribute set API uses the iterators of the btree_map directly. This requires changes in various files because the internals of libexpr are very entangled. This code runs and compiles, but there is a bug causing empty attribute sets to be assigned incorrectly.
This commit is contained in:
parent
42205f27fc
commit
986a8f6b75
14 changed files with 187 additions and 176 deletions
6
third_party/nix/src/libexpr/value-to-json.cc
vendored
6
third_party/nix/src/libexpr/value-to-json.cc
vendored
|
|
@ -51,15 +51,15 @@ void printValueAsJSON(EvalState& state, bool strict, Value& v,
|
|||
auto obj(out.object());
|
||||
StringSet names;
|
||||
for (auto& j : *v.attrs) {
|
||||
names.insert(j.name);
|
||||
names.insert(j.second.name);
|
||||
}
|
||||
for (auto& j : names) {
|
||||
Attr& a(*v.attrs->find(state.symbols.Create(j)));
|
||||
auto [_, a] = *v.attrs->find(state.symbols.Create(j));
|
||||
auto placeholder(obj.placeholder(j));
|
||||
printValueAsJSON(state, strict, *a.value, placeholder, context);
|
||||
}
|
||||
} else {
|
||||
printValueAsJSON(state, strict, *i->value, out, context);
|
||||
printValueAsJSON(state, strict, *i->second.value, out, context);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue