From fc8c5fdce62fb229202659408798a7b6c98f6e8b Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 28 Apr 2023 01:36:55 +0800 Subject: --- cli/internal/runcache/output_watcher.go | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 cli/internal/runcache/output_watcher.go (limited to 'cli/internal/runcache/output_watcher.go') diff --git a/cli/internal/runcache/output_watcher.go b/cli/internal/runcache/output_watcher.go deleted file mode 100644 index 5f90f0e..0000000 --- a/cli/internal/runcache/output_watcher.go +++ /dev/null @@ -1,32 +0,0 @@ -package runcache - -import ( - "context" - - "github.com/vercel/turbo/cli/internal/fs" -) - -// OutputWatcher instances are responsible for tracking changes to task outputs -type OutputWatcher interface { - // GetChangedOutputs returns which of the given globs have changed since the specified hash was last run - GetChangedOutputs(ctx context.Context, hash string, repoRelativeOutputGlobs []string) ([]string, error) - // NotifyOutputsWritten tells the watcher that the given globs have been cached with the specified hash - NotifyOutputsWritten(ctx context.Context, hash string, repoRelativeOutputGlobs fs.TaskOutputs) error -} - -// NoOpOutputWatcher implements OutputWatcher, but always considers every glob to have changed -type NoOpOutputWatcher struct{} - -var _ OutputWatcher = (*NoOpOutputWatcher)(nil) - -// GetChangedOutputs implements OutputWatcher.GetChangedOutputs. -// Since this is a no-op watcher, no tracking is done. -func (NoOpOutputWatcher) GetChangedOutputs(ctx context.Context, hash string, repoRelativeOutputGlobs []string) ([]string, error) { - return repoRelativeOutputGlobs, nil -} - -// NotifyOutputsWritten implements OutputWatcher.NotifyOutputsWritten. -// Since this is a no-op watcher, consider all globs to have changed -func (NoOpOutputWatcher) NotifyOutputsWritten(ctx context.Context, hash string, repoRelativeOutputGlobs fs.TaskOutputs) error { - return nil -} -- cgit v1.2.3-70-g09d2