about summary refs log tree commit diff
path: root/tvix/derivation/src/validate.rs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-01-18 r/5695 refactor(tvix/derivation): rename {ValidateDerivation,}ErrorFlorian Klink1-23/+15
This is now used in more than just validate(). Change-Id: I69c3ad6cb5f3ad60a636fe2ea05d432aebe8e53b Reviewed-on: https://cl.tvl.fyi/c/depot/+/7851 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-01-18 r/5694 feat(tvix/derivation): also fail if output name is called `drv`Florian Klink1-3/+21
`drv` is an invalid output name too, as this would cause a `builtins.derivation` call to return an attrset with a `drvPath` key (which already exists) and has a different meaning. Also handle errors during store path construction, and return our own error type, instead of the ParseStorePathError. Change-Id: Ib7952dde1d5cf18a0e210928df7c57b5939b7678 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7850 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de>
2023-01-16 r/5668 refactor(tvix/derivation): expose proper ValidateDerivationErrorFlorian Klink1-27/+50
Use proper errors, instead of anyhow. Change-Id: I6db14c72a6319b389b0136aac7b84f50a30fb366 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7847 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2023-01-16 r/5667 feat(tvix/derivation): make input_sources a BTreeSetFlorian Klink1-9/+1
These need to be sorted anyways, so let's use the correct data structure for it. Change-Id: I009c9989d7647dc1df716170f3680c981db6e4b2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7846 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2023-01-13 r/5657 refactor(tvix/derivation): use BTreeSet for derivation outputsVincent Ambo1-9/+1
When constructing derivations inside builtins.derivationStrict, we'd have to very frequently check whether certain outputs have already been inserted into the derivation inputs. Using a set type is much easier, especially as this has to be ordered and the source data that is being inserted also comes from a set, which might let us pass this more efficiently in the future. Note that the validate function no longer checks the order of the entries, as that is now guaranteed by the type. Change-Id: I2fbb984facba3e668075f6f8df8992092368c63d Reviewed-on: https://cl.tvl.fyi/c/depot/+/7826 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2023-01-06 r/5616 fix(tvix/derivation): fix build after StorePath renameVincent Ambo1-1/+1
This project was not previously covered by CI (fixed in this commit), so we didn't catch breakage due to a renamed module. This was noticed while rebasing a CL that has a dependency on this crate in its Nix build. Change-Id: Ic48570b9313e5f73e14daab50cf7ea70918c94d1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7778 Reviewed-by: flokli <flokli@flokli.de> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-01-06 r/5613 refactor(tvix/store): rename NixPath to StorePathFlorian Klink1-3/+3
As discussed in #tvl, this is a more common term for it. Change-Id: I9b904222b8c076f82192c9b7f0b42be171614ab7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7776 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-01-04 r/5591 feat(tvix/derivation): implement Derivation::validate()Florian Klink1-0/+104
Change-Id: I87dfadda872439e108e5f678a5da63dd5b1915d1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7732 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI