From 5eb89be68246f1e5a8cd28e48d5cec75921ca97a Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Mon, 10 Oct 2022 00:32:57 -0400 Subject: feat(tvix/eval): Implement builtins.fromJSON Using `serde_json` for parsing JSON here, plus an `impl FromJSON for Value`. The latter is primarily to stay "dependency light" for now - likely going with an actual serde `Deserialize` impl in the future is going to be way better as it allows saving significantly on intermediary allocations. Change-Id: I152a0448ff7c87cf7ebaac927c38912b99de1c18 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6920 Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/eval/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'tvix/eval/default.nix') diff --git a/tvix/eval/default.nix b/tvix/eval/default.nix index 5147ebe8e678..2989e8348f15 100644 --- a/tvix/eval/default.nix +++ b/tvix/eval/default.nix @@ -106,11 +106,15 @@ lib.fix (self: depot.third_party.naersk.buildPackage (lib.fix (naerskArgs: { base="$(dirname "$i")/$(basename "$i" ".nix")" - if [[ "$(basename "$i")" == "eval-okay-search-path.nix" ]]; then - # TODO(sterni): fix this test - echo "SKIPPED: $i" - continue - fi + case "$(basename $i)" in + eval-okay-search-path.nix) ;& + eval-okay-fromjson.nix) + # TODO(sterni,grfn): fix these tests + echo "SKIPPED: $i" + continue + ;; + *) ;; + esac if test -e $base.exp; then flags= -- cgit 1.4.1