about summary refs log tree commit diff
path: root/tvix/eval/src/properties.rs
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2022-10-15T14·21+0200
committerclbot <clbot@tvl.fyi>2022-10-16T19·11+0000
commit0624d78af0839cd8b290eb9cb6e5737f01162b96 (patch)
tree65b3044307223c33b6cdb02a82f8b565889a531a /tvix/eval/src/properties.rs
parenta8f7383fcb151f76c9cda1235abf0577b1ce6720 (diff)
refactor(tvix/eval): make OpFindFile use internal UnresolvedPath r/5146
To assert that OpFindFile is only emitted for specially compiled SPATH
expressions, as well as make sure it doesn't accidentally operate on
“ordinary values”, introduce an UnresolvedPath internal value. If
OpFindFile sees a non-UnresolvedPath value, it'll crash.

Note that this change is not done purely for OpFindFile: We may want to
compile SPATH expressions as function calls to __findFile (like C++ Nix
does) in the future, so the UnresolvedPath value would definitely need
to be an ordinary string again then. Rather, this change is done in
preparation for resolving home dir relative paths at runtime (since they
depend on the environment) for which we'll need a similar mechanism to
OpFindFile.

Change-Id: I6acf287f35197cd9e13377079f972b9d36e5b22e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7023
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: Adam Joseph <adam@westernsemico.com>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src/properties.rs')
0 files changed, 0 insertions, 0 deletions