about summary refs log tree commit diff
path: root/tvix
AgeCommit message (Collapse)AuthorFilesLines
2024-11-04 r/8893 feat(tvix/nix-compat): Add nix serialization supportBrian Olsen20-15/+2339
This change implements the serialization part that is needed to implement the nix daemon protocol. Previously was add deserialization and derivers for that and this then adds the other part of that equation so that you can write types that can then be read using deserialization. Change-Id: I2917de634980a93822a4f5a8ad38897b9ce16d89 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12729 Autosubmit: Brian Olsen <me@griff.name> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-11-04 r/8892 fix(tvix/nix-compat-derive): Better errors for defaultBrian Olsen2-7/+13
This adds a span to default handling so that any error message gives a more precise location as a hint for why the error occurred instead of just pointing to the type. Change-Id: I7bf6cf38e0284f9726d670ea50a94a6b1edd8a94 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12728 Reviewed-by: Vladimir Kryachko <v.kryachko@gmail.com> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Autosubmit: Brian Olsen <me@griff.name>
2024-11-04 r/8891 feat(tvix/eval): use with_capacity instead of a growing vecBob van der Linden1-1/+1
Change-Id: I4d89663eb9ac772ce1008ed5ee218bc7016164e7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12733 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-11-04 r/8890 refactor(tvix/eval): remove Value::Json and related functionalityBob van der Linden8-109/+27
Currently Value::Json is used in combination with VMRequest::ToJson to recursively convert tvix Value to serde_json::Value. This functionality is used in builtins.toJSON as well as derivation __structuredAttrs. Both Value::Json and VMRequest::ToJson were removed in this commit. Related functionality in vm.rs is also removed: vm.rs does not know about JSON anymore. Recursively converting to serde_json now happens without going through the VM. Thrown errors that are part of the value of toJSON are now directly propagated as ErrorKind, were-as previously there was a split between CatchableErrorKind and ErrorKind, where eventually CatchableErrorKind would be converted to ErrorKind::Catchable. Change-Id: I066f064926c491e4c087a984f07af43d19124cfe Reviewed-on: https://cl.tvl.fyi/c/depot/+/12732 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-11-04 r/8889 test(tvix/eval): test throw in __toString with toJSONBob van der Linden2-1/+4
Change-Id: Ia4a9a04c7e157b6add94dc8901ffab35486fe344 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12731 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2024-11-04 r/8888 test(tvix/glue): check context of __toString after toJSONBob van der Linden2-1/+2
Change-Id: I65e3a8e8284ffb4986970ea67ed8d6b216e1eb66 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12730 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-11-04 r/8887 chore(tvix/nix-compat-derive): Remove references to nixrsBrian Olsen3-5/+8
Some references to nixrs had sneaked in while writing the original CL so this just removes those. Change-Id: I635adbd2de46c7c1f31e1d449396253a78e1b762 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12727 Reviewed-by: Vladimir Kryachko <v.kryachko@gmail.com> Autosubmit: Brian Olsen <me@griff.name> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-11-03 r/8886 fix(tvix/build): Fix tests and clippy warnings on MacOSBrian Olsen1-3/+8
When running tests for buildservice on MacOS it would fail because of the oci test. I also got some clippy warnings on MacOS because of disabled code. Change-Id: I235739fa4270a4ef46e54d3e2b8cbb55eb20bdda Reviewed-on: https://cl.tvl.fyi/c/depot/+/12726 Reviewed-by: flokli <flokli@flokli.de> Autosubmit: Brian Olsen <me@griff.name> Tested-by: BuildkiteCI
2024-11-03 r/8885 fix(tvix/nix-compat-derive-tests) More enum testsBrian Olsen1-6/+65
Before this commit only deriving of tuple enums where tested. This adds a few tests to cover the other types of enums. Change-Id: I62f311e4db98cab84bd4ac164d50051e9aab0d4d Reviewed-on: https://cl.tvl.fyi/c/depot/+/12725 Autosubmit: Brian Olsen <me@griff.name> Reviewed-by: Vladimir Kryachko <v.kryachko@gmail.com> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-11-03 r/8884 chore(tvix/docs): Small changes to Nix Daemon protocol descriptionBrian Olsen5-14/+15
I found some more operations that are obsolete and a few missing fields. I also did some small changes to make handshake description more consistent. Change-Id: I9f853a37e9d50621491f31ea71879d6a600046e2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12724 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2024-11-02 r/8883 docs(tvix/TODO): add Value::Json TODOFlorian Klink1-0/+9
Change-Id: Id47c1e3f98cb0bf53006b002417b69cfa49b7410 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12721 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-11-02 r/8882 feat(tvix/glue): use InvalidHash for builtins.pathBob van der Linden1-10/+1
Previously such errors showed up as: error[E006]: expected value of type 'sha256', but found a 'not a sha256' Now they show up as: error[E041]: Invalid hash: invalid encoded digest length '31' for algo sha256 This is consistent with the errors of `builtins.fetchurl`. Change-Id: Id11b26fc7951778640cc4e41b3bf23203eaf07df Reviewed-on: https://cl.tvl.fyi/c/depot/+/12719 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2024-11-02 r/8881 feat(tvix/eval): introduce ErrorKind::InvalidHashBob van der Linden2-2/+6
The nixhash errors were wrapped in a generic TvixError. Now it has its own TvixError with unique error code. The nixhash error is passed along as a string. The errors looked like: error[E997]: invalid encoded digest length '51' for algo sha256 Now they look like: error[E041]: Invalid hash: invalid encoded digest length '51' for algo sha256 Change-Id: I5c420815538ba4c6567c95f5d44d60c4d48f43fd Reviewed-on: https://cl.tvl.fyi/c/depot/+/12718 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-11-02 r/8880 fix(tvix/nix_compat): Fix nix-daemon handshakeVova Kryachko1-8/+63
Existing handshake behavior assumed that the server version is always at least as new as the client. Meaning that the client's version was always picked the handshake details as well as for further communication This change removes that assumption and correctly uses min(server_version, client_version). Change-Id: Ia5dad4613dd5f69a0aeb6c9d86982f1f36fe1a4c Reviewed-on: https://cl.tvl.fyi/c/depot/+/12722 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2024-11-01 r/8879 fix(tvix/tracing): Enable tracing in tvix-build.Vova Kryachko3-2/+5
Change-Id: Ica9734d7774da4d5e2a5cacab6b9feb27becc3e2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12720 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2024-10-30 r/8878 feat(tvix/nix-daemon): Initial skeleton for nix-daemonVova Kryachko6-0/+213
The goal is to create a drop-in replacement nix-daemon that nix-cpp can use as a `daemon` store. Change-Id: Ie092047dcc6a24a3b8d8d1b808f3e6fd2c493bf2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12711 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-10-30 r/8877 refactor(tvix/tracing): drop log_level methodFlorian Klink1-24/+4
There's no more consumers left. Change-Id: I0585abbdbe0ffcf35cd20ac58077ade67cbf5c75 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12715 Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
2024-10-30 r/8876 refactor(tvix/build): drop log level cli argFlorian Klink1-11/+2
This does the same as cl/12585 did for tvix-cli. Change-Id: Ia2d693f5ad10feb81777c951bcd4489a3a83ad7c Reviewed-on: https://cl.tvl.fyi/c/depot/+/12716 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-10-30 r/8875 refactor(tvix/store): drop log level cli argFlorian Klink1-8/+1
This does the same as cl/12585 did for tvix-cli. Change-Id: I35215947f3616acd65654c2bbdb19d0c360b568b Reviewed-on: https://cl.tvl.fyi/c/depot/+/12714 Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
2024-10-28 r/8874 chore(tvix/shell): add cargo-flamegraphsterni1-0/+1
Change-Id: I991337d6db2442b1239ca048b25f28985cfdaa05 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12706 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Autosubmit: sterni <sternenseemann@systemli.org>
2024-10-27 r/8869 fix(tvix/eval): fix unused variable warnings being invertedYureka1-1/+1
Thanks to lexi for finding this Change-Id: Ic248af55426630b5e07183e4eac1596d52954478 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12696 Tested-by: BuildkiteCI Autosubmit: yuka <yuka@yuka.dev> Reviewed-by: tazjin <tazjin@tvl.su>
2024-10-27 r/8868 fix(tvix/build): fix build on MacOSFlorian Klink1-0/+1
oci_spec::runtime::Posix* stuff is feature-flagged out on MacOS. While it might be desirable to emit Linux OCI runtime specs from MacOS to schedule there, and it being feature-flagged to Linux might be a bug in the upstream crate, we only have an implementation invoking runc, which certainly don't work. Feature-flag this out to make tvix-build and tvix-cli to build on MacOS. This can be revisited once we actually start thinking about builders on MacOS. Change-Id: I82002f6d55eddd9c305f1b3a3f3f2b252f617ed0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12694 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-10-27 r/8867 fix(tvix/castore/fs): fix build for MacOSFlorian Klink1-2/+3
fuse_backend_rs::api::filesystem::Layer is not exposed for non-Linux, and feature-flagged on virtiofs, so only implement the trait for these cases. Change-Id: Id8455dc5be502f8375836ba04288d50c59d69d89 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12693 Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-10-27 r/8866 fix(tvix/shell): fix shell on MacOSFlorian Klink2-3/+4
runc is not available on MacOS, we only want to include it in the shell if on Linux. Point TVIX_BUILD_SANDBOX_SHELL to /bin/sh if not on Linux. While we cannot use the OCI/runc executor on MacOS, other implementations might make use of this env var, so it's good to keep setting it. Also update the other occurence of it, in tvix/utils.nix. Change-Id: If7b47e1bb7c41bbde84c93016713754a252c4355 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12691 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com> Tested-by: BuildkiteCI
2024-10-27 r/8863 feat(tvix/tracing): filter indicatif.pb_show fields in all casesFlorian Klink1-1/+7
Change-Id: I688cec79cefeae340872945c35743fae892cd053 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12688 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: yuka <yuka@yuka.dev> Reviewed-by: flokli <flokli@flokli.de>
2024-10-27 r/8862 docs(tvix/TODO): add OCI preflight checksFlorian Klink1-0/+5
Change-Id: I0865487f84556932149d95902d7399b5f7037314 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12687 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: yuka <yuka@yuka.dev>
2024-10-27 r/8861 docs(tvix/build): we use stricter castore typesFlorian Klink1-2/+0
Change-Id: Ie96b4f85d46984cac2ecc50ff9b70fa0b26ae80d Reviewed-on: https://cl.tvl.fyi/c/depot/+/12686 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: yuka <yuka@yuka.dev>
2024-10-27 r/8860 chore(3p/sources): bump channels & overlays (2024-10-23)Vincent Ambo8-506/+116
* ops/modules: remove deprecated headscale DNS setting * users/aspen: use stable julia again (upstream ticket is resolved, and 16 has been removed because it's long deprecated) * users/wpcarro: utillinux -> util-linux * 3p/overlays: temporarily restore utillinux until upstream breakage is fixed * users/tazjin: noto-cjk -> noto-cjk-sans * tvix: regenerate Go protobufs Change-Id: I9dbec812306cd4e66030d14bbea3805e8224e0d5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12679 Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: aspen <root@gws.fyi> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2024-10-24 r/8855 refactor(tvix/build): use stricter BuildRequest typeMarijan Petričević12-175/+221
Change-Id: Ifadd190e10ec22570ab3ccb4df54f64ae5ef0a44 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12674 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2024-10-23 r/8854 chore(tvix/cli): drop direct nix-compat dependencyFlorian Klink3-6/+0
This is only using nix-compat through tvix-glue. Change-Id: Ib6391987954a28cc05a2c27c1c21585185d82d1a Reviewed-on: https://cl.tvl.fyi/c/depot/+/12681 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com> Tested-by: BuildkiteCI
2024-10-23 r/8853 chore(tvix/cli): drop direct castore dependencyFlorian Klink3-6/+0
This is only using tvix-castore through tvix-store. Change-Id: I342ee1e18f8c3946b712cfb446520b732091d58f Reviewed-on: https://cl.tvl.fyi/c/depot/+/12680 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-10-21 r/8850 fix(tvix/glue): don't use builtins.currentSystem in testFlorian Klink1-1/+1
This test will otherwise obviously fail on aarch64-linux, or anything not x86_64-linux, as it'll produce a different Derivation. Change-Id: Iedddcb6aeff05e49fc2e6da27f08111cdc9affec Reviewed-on: https://cl.tvl.fyi/c/depot/+/12677 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: edef <edef@edef.eu> Tested-by: BuildkiteCI
2024-10-19 r/8839 fix(tvix/glue/tvix_store_io): err from store_path_to_node with trace lvlFlorian Klink1-1/+1
When evaluating nixpkgs from the <nixpkgs> channel, store_path_to_node returns an error, falling back to regular filesystem access. This currently produces a warning in the CLI, which is misleading, so degrade to trace level. Change-Id: I4cb2297cc85a2c0e904a37343748f9051aa6d5c7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12665 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-10-19 r/8838 refactor(tvix/store/pathinfo/signing_wrapper): remove cloneFlorian Klink1-9/+17
Construct the owned signature in a separate scope, so all borrows to the original PathInfo are already dropped again, and we can modify the PathInfo without having to clone it. Change-Id: I03e7390540c2cfe7a2c61850bdbe8a33d213a5d9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12663 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-10-19 r/8837 refactor(tvix): make indicatif.pb_show=1 more explicitFlorian Klink3-47/+126
This pushes generating spans with pb_show up to the caller. They usually have more context on how to present things, if at all. Change-Id: Icfcaa64a8a57dce50c0261f2d06e7c051e3946c2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12657 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-10-19 r/8836 refactor(tvix/castore): add try_into_anonymous_node, rename to try_*Florian Klink10-31/+59
We have two places where we parse protos and want their names to be empty: - Receiving a root node in a nar-bridge NAR request - Processing the CalculateNAR gRPC call We don't have any place where we want to keep a name as bytes::Bytes around, yet we used the `into_name_bytes_and_node` method. It was also a bit wrongly named - it wasn't very clear the name was not validated, and that the function may fail. This moves the "splitting off the name as bytes::Bytes" part into a private helper, only leaving the `try_into_name_and_node` and `try_into_anonymous_node` methods around. Change-Id: I2c7fd9871d49ec67450d7efa6a30d96197fb319c Reviewed-on: https://cl.tvl.fyi/c/depot/+/12664 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Marijan Petričević <marijan.petricevic94@gmail.com> Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-10-18 r/8835 refactor(tvix/[ca]store): use auto_implFlorian Klink16-99/+85
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-18 r/8834 docs(tvix/TODO): add instance_name idea for storesFlorian Klink1-0/+4
Change-Id: If14f81ca7180109195f35352b0f43b8d997176cd Reviewed-on: https://cl.tvl.fyi/c/depot/+/12660 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: edef <edef@edef.eu> Tested-by: BuildkiteCI
2024-10-18 r/8833 fix(tvix/store/pathinfo): use gRPC NarCalculationServiceFlorian Klink2-1/+14
If the PathInfoService is using gRPC, expose it via the nar_calculation_service() method in the PathInfoService. Also pass nar_calculation_service through in tha blanket impl. This now causes a `tvix-store import` using the default config to not fall back to `SimpleRenderer`, which will calculate the NAR hash and size by downloading the uploaded blobs (and blobs it didn't need to upload) locally, making such imports faster. Change-Id: If2c3fe6584e9093cba322d2360f355a3923904ae Reviewed-on: https://cl.tvl.fyi/c/depot/+/12658 Tested-by: BuildkiteCI Reviewed-by: edef <edef@edef.eu> Autosubmit: flokli <flokli@flokli.de>
2024-10-18 r/8832 fix(tvix/store/grpc_wrapper): don't validate node nameFlorian Klink1-4/+7
Clients can (and do) send an empty name in here, and we discard it anyways. Change-Id: Iec135d9cba48cc066464e5639319c845079787e9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12659 Reviewed-by: edef <edef@edef.eu> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
2024-10-18 r/8831 refactor(tvix/build): remove proto::BuildRequest::validateMarijan Petričević3-115/+12
Change-Id: I96fa98946bf6aff5eedcb220e2b6b3d90c204eec Reviewed-on: https://cl.tvl.fyi/c/depot/+/12633 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-10-18 r/8830 refactor(tvix/build): add stricter BuildRequest typeMarijan Petričević3-3/+315
Change-Id: I2950c76bbc2227952e583426bfb3ed34e8da6d2d Reviewed-on: https://cl.tvl.fyi/c/depot/+/12625 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-10-17 r/8826 docs(tvix/TODO): extend NAR rendering prefetching ideaFlorian Klink1-2/+7
With the seekable NAR renderer, figuring out the next few blobs to render became possible. Change-Id: I1214302f88e6f9aba74227f84df0f964d587baf2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12652 Tested-by: BuildkiteCI Reviewed-by: edef <edef@edef.eu> Autosubmit: flokli <flokli@flokli.de>
2024-10-17 r/8825 refactor(tvix/store): remove use of lazy_staticFlorian Klink9-123/+119
This is now supported in the standard library via std::sync::LazyLock, but requires some manual shuffling around of code. Change-Id: Ifca792f4d2dbc36b703de4a4dfa406015ab86da7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12614 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: flokli <flokli@flokli.de> Reviewed-by: edef <edef@edef.eu> Tested-by: BuildkiteCI
2024-10-17 r/8824 refactor(tvix/castore): remove remaining lazy_static usageFlorian Klink4-16/+8
Change-Id: I86480cf625a457c4aa8153262f829d34c230b084 Co-authored-by: edef <edef@edef.eu> Reviewed-on: https://cl.tvl.fyi/c/depot/+/12613 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: edef <edef@edef.eu>
2024-10-17 r/8823 refactor(tvix/castore): remove use of lazy_staticFlorian Klink5-126/+145
This is now supported in the standard library via std::sync::LazyLock, but requires some manual shuffling around of code. Change-Id: Ia0370ca46cb1c6122a452b1d117160536b632c7e Reviewed-on: https://cl.tvl.fyi/c/depot/+/12612 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2024-10-17 r/8822 refactor(nix-compat/store_path): drop build_nar_based_store_pathFlorian Klink2-17/+5
This is the only (remaining) occurence of it, and not really more code than just calling store_path::build_ca_path with `CAHash::Nar(NixHash::Sha256(…))`, especially considering we need the CAHash in the PathInfo struct later anyways - so let's remove this function. Change-Id: Ia82212086062c366e0280ca0823d9e68a3f91d3a Reviewed-on: https://cl.tvl.fyi/c/depot/+/12632 Reviewed-by: edef <edef@edef.eu> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-10-17 r/8821 chore(tvix/castore): remove commented-out test fixtureFlorian Klink1-9/+1
This became obsolete, since the introduction of a stricter `Directory` struct invalid names cannot be represented anymore. Change-Id: I9e4b1b6cca01831d0a9735f58d8a1f59ac18676b Reviewed-on: https://cl.tvl.fyi/c/depot/+/12615 Reviewed-by: flokli <flokli@flokli.de> Reviewed-by: edef <edef@edef.eu> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-10-17 r/8820 docs(tvix/TODO): drop PathInfo including references by content ideaFlorian Klink1-27/+0
This is not gonna work out as-is, as we still key PathInfos by their store path digest, and how to handle thing if we encounter a Frankenbuild. For now, let's keep the PathInfoService data as it is, we can record this information (and more) in the builder structures. Change-Id: Ic38fc3ecd8096a5fe002e681bdc812a9dbeaa7d2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12607 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: edef <edef@edef.eu>
2024-10-16 r/8815 refactor(tvix/glue): merge builtins.{filterSource,path} codepathsFlorian Klink1-108/+82
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>