Native Builder: Define Snapshotter protocol (#491)

This PR defines the snapshotter protocol

```swift
    ///Mount a snapshot and all its previous layers
    func prepare(_ snapshot: Snapshot) async throws -> Snapshot

    /// Commit a snapshot, making it permanent.
    func commit(_ snapshot: Snapshot) async throws -> Snapshot

    /// Remove a snapshot from snapshot store
    func remove(_ snapshot: Snapshot) async throws
```

It updates executors to work with this new protocol
This commit is contained in:
Sidhartha Mani
2025-08-12 23:30:56 -07:00
committed by GitHub
parent 0885cdd6a9
commit d2f48982c1
20 changed files with 907 additions and 748 deletions
@@ -33,6 +33,7 @@ extension ExecutorError {
case executionFailed
case cancelled
case invalidConfiguration
case unsupportedOperation
}
/// Represents the detailed context of an error that occurred during a build.