about summary refs log tree commit diff
path: root/tvix/verify-lang-tests/default.nix
diff options
context:
space:
mode:
authorIlan Joselevich <personal@ilanjoselevich.com>2024-08-03T22·00+0300
committerIlan Joselevich <personal@ilanjoselevich.com>2024-08-09T14·35+0000
commit3511e328ec67c0481c1412675c1b47025486d453 (patch)
tree675dfce09263441e6cf2e673067ca0792fc3016a /tvix/verify-lang-tests/default.nix
parent9c4b57ac6330da5c6aa795778dd7e0e6c0721d67 (diff)
feat(tvix/eval): Implement builtins.readFileType r/8466
builtins.readFileType was added to Nix back in version 2.14.

The tests were also moved out of notyetpassing in addition to the
readDir fixtures they depend on.

I caught a bug where we previously used std::fs::metadata (via the
.metadata() method on File) which follows symlinks so it would always
return false for is_symlink(). Instead we now use
std::fs::symlink_metadata directly which does not follow symlinks, so
tests now pass. This wasn't an issue for builtins.readDir as it uses
walkdir and walkdir doesn't follow symlinks either.

Change-Id: I58eb97bdb5ec95df4f6882f495f8c572fe7c6793
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12130
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/verify-lang-tests/default.nix')
-rw-r--r--tvix/verify-lang-tests/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/verify-lang-tests/default.nix b/tvix/verify-lang-tests/default.nix
index b363f32dd9bf..29d963065ea3 100644
--- a/tvix/verify-lang-tests/default.nix
+++ b/tvix/verify-lang-tests/default.nix
@@ -70,7 +70,7 @@ let
     "eval-okay-cycle-display-cpp-nix-2.13.nix" = [ nix_2_3 ];
     # builtins.replaceStrings becomes lazier in Nix 2.16
     "eval-okay-replacestrings.nix" = [ nix_2_3 ];
-    # builtins.readFileType is added in Nix 2.15
+    # builtins.readFileType is added in Nix 2.14
     "eval-okay-readFileType.nix" = [ nix_2_3 ];
     # builtins.fromTOML gains support for timestamps in Nix 2.16
     "eval-okay-fromTOML-timestamps.nix" = [ nix_2_3 ];