refactor(tvix/castore): add separate Error enum for archives

The `Error` enum for the `imports` crate has both filesystem and archive
specific errors and was starting to get messy.

This adds a separate `Error` enum for archive-specific errors and then
keeps a single `Archive` variant in the top-level import `Error` for all
archive errors.

Change-Id: I4cd0746c864e5ec50b1aa68c0630ef9cd05176c7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11498
Tested-by: BuildkiteCI
Autosubmit: Connor Brewster <cbrewster@hey.com>
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Connor Brewster 2024-04-21 17:40:02 -05:00 committed by clbot
parent 79698c470c
commit d2e67f021e
3 changed files with 37 additions and 33 deletions

View file

@ -54,6 +54,9 @@ pub enum FetcherError {
#[error(transparent)]
Import(#[from] tvix_castore::import::Error),
#[error(transparent)]
ImportArchive(#[from] tvix_castore::import::archive::Error),
#[error("Error calculating store path for fetcher output: {0}")]
StorePath(#[from] BuildStorePathError),
}