tvl-depot/corp
Ryan Lahfa 75cc52ddb1 fix(tvix/eval): getContext merges underlying values
Previously, we were assembling very naively an attribute set composed of context we saw.

But it was forgetting that `"${drv}${drv.drvPath}"` would contain 2 contexts with the same key, but
with different values, one with `outputs = [ "out" ];` and `allOutputs = true;`.

Following this reasoning and comparing with what Nix does, we ought to merge underlying values systematically.

Hence, I bring `itertools` to perform a group by on the key and merge everything on the fly, it's not
beautiful but it's the best I could find, notice that I don't use
`group_by` but I talk about group by, that is, because `group_by` is a
`group_by_consecutive`, see
https://github.com/rust-itertools/itertools/issues/374.

Initially, I tried to do it without a `into_grouping_map_by`, it was akin to assemble the final `NixAttrs` directly,
it was less readable and harder to pull out because we don't have a lot of in-place mutable functions on
our data structures.

Change-Id: I9933c9bd88ffe04de50dda14f21879b60d8b8cd4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10620
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-01-17 17:25:24 +00:00
..
ops chore(ops): move yandex-base-image to //ops and bake in keys 2023-10-08 18:13:49 +00:00
rih chore(3p/sources): bump channels & overlays (2023-12-29) 2023-12-29 21:52:10 +00:00
russian chore(3p/sources): bump channels & overlays (2023-12-29) 2023-12-29 21:52:10 +00:00
tvixbolt fix(tvix/eval): getContext merges underlying values 2024-01-17 17:25:24 +00:00
website docs(corp/website): distinguish TVL LLC and TVL 2023-02-03 19:04:20 +00:00
LICENSE chore(corp): update copyright years 2023-05-23 10:17:24 +00:00
OWNERS chore(gerrit): migrate OWNERS files to code-owners style 2022-09-19 11:13:28 +00:00