nix-super/tests/unit/libexpr
Eelco Dolstra 8c0590fa32 Never update values after setting the type
Thunks are now overwritten by a helper function
`Value::finishValue(newType, payload)` (where `payload` is the
original anonymous union inside `Value`). This helps to ensure we
never update a value elsewhere, since that would be incompatible with
parallel evaluation (i.e. after a value has transitioned from being a
thunk to being a non-thunk, it should be immutable).

There were two places where this happened: `Value::mkString()` and
`ExprAttrs::eval()`.

This PR also adds a bunch of accessor functions for value contents,
like `Value::integer()` to access the integer field in the union.
2024-03-25 19:21:25 +01:00
..
flake Fix extraction of name for defaultPackage URLs 2024-02-27 07:53:05 +01:00
value Add a ListBuilder helper for constructing list values 2024-03-15 18:26:37 +01:00
derived-path.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
error_traces.cc Fix tests 2024-02-08 15:55:20 -08:00
eval.cc allowed-uris: Match whole schemes also when scheme is not followed by slashes 2023-12-11 12:18:04 +01:00
json.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
local.mk Move url-name utility to libexpr/flake 2023-12-22 09:33:02 +01:00
primops.cc Never update values after setting the type 2024-03-25 19:21:25 +01:00
search-path.cc Move tests to separate directories, and document 2023-12-01 10:48:58 -05:00
trivial.cc Never update values after setting the type 2024-03-25 19:21:25 +01:00