snix/tvix/glue/src
Florian Klink b4b2ae1cc6 refactor(tvix/glue): merge builtins.{filterSource,path} codepaths
This moves the implementation from builtins.path into a helper function,
which we now call from both builtins.

Most of the Value plumbing stays inside this helper.

We also implemented handling of symlinks at the root, which was handled
in builtins.filterSource, but not builtins.path - by peeking at the
FileType using std::fs::metadata, instead of the EvalIO trait.

For now, this is fine, as our filtered_ingest also goes via the
filesystem directly. It ends up with the same semantics as before and in
Nix - symlinks at the root are followed, except if they point to an
invalid target.

In the future, we should revisit this, and then maybe get both stat and
lstat into EvalIO, though we will need to be very careful about the
semantics for following symlink inside store paths.

Change-Id: I6a941c0187db36165c2f7a338015e4e32d41b298
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12629
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-10-16 19:29:09 +00:00
..
builtins refactor(tvix/glue): merge builtins.{filterSource,path} codepaths 2024-10-16 19:29:09 +00:00
fetchers refactor(tvix/store): use strictly typed PathInfo struct 2024-10-11 17:18:20 +00:00
tests test(tvix/glue): add builtins.storeDir regression test 2024-10-15 18:16:12 +00:00
.skip-subtree refactor(tvix): move tvix glue code into glue crate 2023-11-04 15:18:44 +00:00
fetchurl.nix refactor(tvix): move tvix glue code into glue crate 2023-11-04 15:18:44 +00:00
fetchurl.rs feat(tvix/glue): support builtin:fetchurl 2024-06-12 22:31:17 +00:00
known_paths.rs refactor(tvix/glue): remove use of lazy_static 2024-10-13 14:45:17 +00:00
lib.rs refactor(tvix): move refscan module to castore 2024-09-27 20:39:58 +00:00
tvix_build.rs refactor(tvix/glue): remove use of lazy_static 2024-10-13 14:45:17 +00:00
tvix_io.rs docs(tvix/glue/tvix_io): update doc-comments 2024-08-19 10:24:37 +00:00
tvix_store_io.rs refactor(tvix/glue/builtins/import): refactor 2024-10-15 23:26:26 +00:00