about summary refs log tree commit diff
path: root/tvix/docs
diff options
context:
space:
mode:
authorBob van der Linden <bobvanderlinden@gmail.com>2024-11-03T15·59+0100
committerBob van der Linden <bobvanderlinden@gmail.com>2024-11-04T10·39+0000
commit9aa479648b63cbffdae4c6365549827692ca1914 (patch)
tree28355d376af37fae2bfdbc39d550c55a5129e5e5 /tvix/docs
parentb6e524c7267f21173a29fdb9ad2bb72297299858 (diff)
refactor(tvix/eval): remove Value::Json and related functionality r/8890
Currently Value::Json is used in combination with VMRequest::ToJson to
recursively convert tvix Value to serde_json::Value. This functionality
is used in builtins.toJSON as well as derivation __structuredAttrs.

Both Value::Json and VMRequest::ToJson were removed in this commit.

Related functionality in vm.rs is also removed: vm.rs does not know
about JSON anymore.

Recursively converting to serde_json now happens without going through
the VM.

Thrown errors that are part of the value of toJSON are now directly
propagated as ErrorKind, were-as previously there was a split between
CatchableErrorKind and ErrorKind, where eventually CatchableErrorKind
would be converted to ErrorKind::Catchable.

Change-Id: I066f064926c491e4c087a984f07af43d19124cfe
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12732
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/docs')
-rw-r--r--tvix/docs/src/TODO.md9
1 files changed, 0 insertions, 9 deletions
diff --git a/tvix/docs/src/TODO.md b/tvix/docs/src/TODO.md
index ff10b26cbf1d..4db77b04d442 100644
--- a/tvix/docs/src/TODO.md
+++ b/tvix/docs/src/TODO.md
@@ -10,15 +10,6 @@ Feel free to add new ideas. Before picking something, ask in `#tvix-dev` to make
 sure noone is working on this, or has some specific design in mind already.
 
 ## Cleanups
-### Evaluator
- - There's not really a good reason why the `tvix_eval::Value::Json` enum kind
-   exists.
-  `builtins.toJSON` should simply produce a string with context, and everything
-   else should be a hidden implementation detail and should not be leaked to
-   `Value`.
-   This is a hack, as we wanted to use `serde_json` as is, but should be cleaned
-   up.
-
 ### Nix language test suite
  - Think about how to merge, but "categorize" `tvix_tests` in `glue` and `eval`.
    We currently only have this split as they need a different feature set /