diff options
author | Peter Kolloch <info@eigenvalue.net> | 2024-02-19T11·18+0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-02-19T16·36+0000 |
commit | b1474529480fc9c36dedaca8ba640c11c64ad3ab (patch) | |
tree | d33e8a4e1bcc7ea39d23d8450be5dd2b3e72a51f /tvix/nix-compat/src/derivation/parse_error.rs | |
parent | f4963cdfd80f0ddfc004be46c519c02efdfeae5c (diff) |
feat(tvix/nix-compat): Extend parse errors r/7556
...so that we can parse (and at the same time validate) store paths directly to `StorePath`s. https: //b.tvl.fyi/issues/264 Change-Id: Ide4cb5403f8e3400f7d2a5838c652ac35dbd1a4f Reviewed-on: https://cl.tvl.fyi/c/depot/+/10968 Reviewed-by: flokli <flokli@flokli.de> Autosubmit: Peter Kolloch <info@eigenvalue.net> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/nix-compat/src/derivation/parse_error.rs')
-rw-r--r-- | tvix/nix-compat/src/derivation/parse_error.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tvix/nix-compat/src/derivation/parse_error.rs b/tvix/nix-compat/src/derivation/parse_error.rs index 26df13f5772b..68228b07c4bc 100644 --- a/tvix/nix-compat/src/derivation/parse_error.rs +++ b/tvix/nix-compat/src/derivation/parse_error.rs @@ -2,7 +2,7 @@ //! Derivations from ATerm. use nom::IResult; -use crate::nixhash; +use crate::{nixhash, store_path}; pub type NomResult<I, O> = IResult<I, O, NomError<I>>; @@ -22,6 +22,9 @@ pub enum ErrorKind { #[error("nix hash error: {0}")] NixHashError(nixhash::Error), + #[error("store path error: {0}")] + StorePathError(#[from] store_path::Error), + #[error("nom error: {0:?}")] Nom(nom::error::ErrorKind), } |