pub async fn reinit_backend<B: Backend>(
project: &Project,
) -> Result<B, FailToInitBackend>Expand description
Re-initialize a backend, preserving cache directories.
This function:
- Identifies cache paths that should be preserved (from
Backend::CACHE_PATHS) - Deletes all non-cache items in the backend directory
- Calls
Backend::init()to re-scaffold the backend
This allows template updates to be applied while keeping expensive build caches.
ยงErrors
Returns an error if the backend directory cannot be read, cleaned, or re-initialized.