tvl-depot/tvix/nix-compat
Marijan Petričević e8040ec61f refactor(tvix/store): use strictly typed PathInfo struct
This switches the PathInfoService trait from using the proto-derived
PathInfo struct to a more restrictive struct, and updates all
implementations to use it.

It removes a lot of the previous conversion and checks, as invalid
states became nonrepresentable, and validations are expressed on the
type level.

PathInfoService implementations consuming protobuf need to convert and
do the verification internally, and can only return the strongly typed
variant.

The nix_compat::narinfo::NarInfo conversions for the proto PathInfo
are removed, we only keep a version showing a NarInfo representation for
the strong struct.

Converting back to a PathInfo requires the root node now, but is
otherwise trivial, so left to the users.

Co-Authored-By: Florian Klink <flokli@flokli.de>
Change-Id: I6fdfdb44063efebb44a8f0097b6b81a828717e03
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12588
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-11 17:18:20 +00:00
..
benches feat(tvix): Jemalloc -> MiMalloc 2024-08-08 08:06:23 +00:00
src refactor(tvix/store): use strictly typed PathInfo struct 2024-10-11 17:18:20 +00:00
testdata feat(nix-compat/nixcpp): init nix.conf config parsing 2024-06-28 12:23:03 +00:00
build.rs fix(tvix): make rstest pick up new test case files 2024-06-05 17:52:17 +00:00
Cargo.toml fix(tvix): Follow-up fixing no-default-features and comments 2024-08-30 13:55:11 +00:00
default.nix chore(tvix): Retain original passthru in Rust builds 2024-08-15 23:37:00 +00:00