tvl-depot/tvix/serde
Vincent Ambo 939cebd0f1 fix(tvix/eval): implement cppnix JSON-serialisation semantics
This drops the usage of serde::Serialize, as the trait can not be used
to implement the correct semantics (function colouring!).

Instead, a manual JSON serialisation function is written which
correctly handles toString, outPath and other similar weirdnesses.

Unexpectedly, the eval-okay-tojson test from the C++ Nix test suite
now passes, too.

This fixes an issue where serialising data structures containing
derivations to JSON would fail.

Change-Id: I5c39e3d8356ee93a07eda481410f88610f6dd9f8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8209
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
2023-03-13 20:30:59 +00:00
..
examples refactor(tvix/serde): allow dead_code in struct 2023-01-31 15:35:46 +00:00
src fix(tvix/eval): implement cppnix JSON-serialisation semantics 2023-03-13 20:30:59 +00:00
.skip-subtree feat(tvix/serde): add an example application to the project 2023-01-31 13:11:28 +00:00
Cargo.toml test(tvix/serde): add initial set of deserialisation tests 2023-01-03 13:37:12 +00:00
default.nix feat(tvix/serde): initial Nix->serde::Deserialize impl 2023-01-02 22:24:43 +00:00