about summary refs log tree commit diff
path: root/tvix/store/src/pathinfoservice/combinators.rs
AgeCommit message (Collapse)AuthorFilesLines
10 days r/8902 refactor(tvix/store): move Cache to cache modFlorian Klink1-156/+0
This being in combinators makes it harder to find. Change-Id: If7984bdbd43f164c670548639bb4846d859f6695 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12750 Reviewed-by: yuka <yuka@yuka.dev> Tested-by: BuildkiteCI
13 days r/8896 feat(tvix): add instance_name to instrumentation of *ServicesBob van der Linden1-6/+12
Currently it is not possible to distinguish between tracing of the same *Service type whenever there are multiple of them. Now the instance_name of ServiceBuilder is passed into the *Service and used in the existing instrument as the `instance_name` field. Places that did not already have a instance_name in its context use `"default"`. In tests I used `"test"`. Change-Id: Ia20bf2a7bb849a781e370d087ba7ddb3be79f654 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12739 Tested-by: BuildkiteCI Autosubmit: Bob van der Linden <bobvanderlinden@gmail.com> Reviewed-by: flokli <flokli@flokli.de>
2024-10-18 r/8835 refactor(tvix/[ca]store): use auto_implFlorian Klink1-2/+2
This implements BS, DS, PS for Box'ed or Arc'ed variants of it with less code, and less potential to accidentially forget to proxy default trait methods for blanked impls, as fixed in cl/12658. Change-Id: If2cdbb563a73792038ebe7bff45d6f880214855b Reviewed-on: https://cl.tvl.fyi/c/depot/+/12661 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: edef <edef@edef.eu>
2024-10-11 r/8787 refactor(tvix/store): use strictly typed PathInfo structMarijan Petričević1-11/+12
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-07-20 r/8380 refactor(tvix/store): use composition in tvix_store crateYureka1-0/+38
Change-Id: Ie6290b296baba2b987f1a61c9bb4c78549ac11f1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11983 Reviewed-by: flokli <flokli@flokli.de> Autosubmit: yuka <yuka@yuka.dev> Tested-by: BuildkiteCI
2024-05-13 r/8144 feat(tvix/store/pathinfo): add a Cache combinatorFlorian Klink1-0/+111
This allows querying two PathInfoService implementations sequentially, and inserts into the "near" one if it's not there yet. There is no negative cache, and put / listing is not implemented (for now). Change-Id: I24c3d0e0c3c2f0524a6cc7b2f3cbc33eb20cf92b Reviewed-on: https://cl.tvl.fyi/c/depot/+/11636 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>