feat(tvix/nix-compat): Extend parse errors

...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
This commit is contained in:
Peter Kolloch 2024-02-19 18:18:15 +07:00 committed by clbot
parent f4963cdfd8
commit b147452948

View file

@ -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),
}