diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-03-31T14·20-0400 |
---|---|---|
committer | John Ericson <git@johnericson.me> | 2023-04-09T15·12+0000 |
commit | 26c68f8e892633bde4aeebbfc0e4ae7ee571687d (patch) | |
tree | e6ee1bcf805ceb83b974f6d1c6a8e7d0b30a9b1f /tvix/nix-compat/src/derivation/errors.rs | |
parent | b4670bfbd16dd80fb52e61e79b4aa6e1d0453570 (diff) |
refactor(nix-compat): Properly encapsulate store path construction r/6088
Before there was code scattered about (e.g. text hashing module and derivation output computation) constructing store paths from low level building blocks --- there was some duplication and it was easy to make nonsense store paths. Now, we have roughly the same "safe-ish" ways of constructing them as C++ Nix, and only those are exposed: - Make text hashed content-addressed store paths - Make other content-addressed store paths - Make input-addressed fixed output hashes Change-Id: I122a3ee0802b4f45ae386306b95b698991be89c8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8411 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/nix-compat/src/derivation/errors.rs')
-rw-r--r-- | tvix/nix-compat/src/derivation/errors.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tvix/nix-compat/src/derivation/errors.rs b/tvix/nix-compat/src/derivation/errors.rs index 2ffd56cf64da..8e9e6a121096 100644 --- a/tvix/nix-compat/src/derivation/errors.rs +++ b/tvix/nix-compat/src/derivation/errors.rs @@ -15,6 +15,8 @@ pub enum DerivationError { InvalidOutputNameForFixed(String), #[error("unable to validate output {0}: {1}")] InvalidOutput(String, OutputError), + #[error("unable to validate output {0}: {1}")] + InvalidOutputDerivationPath(String, store_path::BuildStorePathError), // input derivation #[error("unable to parse input derivation path {0}: {1}")] InvalidInputDerivationPath(String, store_path::Error), |