about summary refs log tree commit diff
path: root/tvix/eval/src/builtins/mod.rs (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2022-09-02 r/4593 feat(tvix/eval): implement 'throw' and 'abort' builtinsVincent Ambo2-1/+18
These do essentially the same, but return different error variants as upstream Nix considers `throw` to be (sometimes) catchable. Change-Id: I1a9ea84567d46fb37287dbf3f3f67052f9382cca Reviewed-on: https://cl.tvl.fyi/c/depot/+/6259 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-09-02 r/4592 refactor(tvix/eval): implement clearer mechanism for globalsVincent Ambo2-15/+60
The set of things that can leak out of `builtins` into the global scope is statically known (it is what Nix 2.3 leaks there, essentially). This is a mild change over the previous mechanism, where instead at the point where the `builtins` set is constructed we "lift" the globals out of there (if they exist). This way users will still eventually be able to add additional builtins, HOWEVER they will not be able to leak them into the global scope. Note that upstream Nix technically leaks _all_ builtins into the global scope using the `__*` prefix, but we are trying to avoid this in Tvix if it is not required in nixpkgs. Change-Id: Ie9dec2ce33740134f3b2464eba3749f421dd5953 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6258 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-09-02 r/4591 feat(tvix/eval): emit warnings when globals are being shadowedVincent Ambo2-0/+2
Change-Id: I7dae6978c2a4548382d7fa059b20ccdf35d2cf7f Reviewed-on: https://cl.tvl.fyi/c/depot/+/6257 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-09-02 r/4590 feat(tvix/eval): add builtins.isNullVincent Ambo1-0/+5
Change-Id: Iae251d41b4ac6b77df56078a954ec3e33b7f9ccf Reviewed-on: https://cl.tvl.fyi/c/depot/+/6256 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-09-02 r/4589 test(tvix/eval): add a simple test for builtins resolutionVincent Ambo2-0/+7
Change-Id: I91f54778b8a17f3448664c21308de656b4b04b3e Reviewed-on: https://cl.tvl.fyi/c/depot/+/6255 Tested-by: BuildkiteCI Reviewed-by: sterni <st