charmbracelet / git-lfs-transfer

Server-side implementation of the Git LFS pure-SSH protocol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Local backend fails to build

KyleFromKitware opened this issue · comments

The transfer.Backend and transfer.LockBackend interfaces have both changed, but local.LocalBackend and local.localLockBackend have not had their implementations adjusted accordingly.

For context, I get the following errors when trying to build with the latest master:

# github.com/charmbracelet/git-lfs-transfer/internal/local
internal/local/backend.go:20:26: cannot use &LocalBackend{} (value of type *LocalBackend) as transfer.Backend value in variable declaration: *LocalBackend does not implement transfer.Backend (wrong type for method Batch)
                have Batch(string, []transfer.Pointer) ([]transfer.BatchItem, error)
                want Batch(string, []transfer.Pointer, map[string]string) ([]transfer.BatchItem, error)
internal/local/backend.go:99:24: cannot use l (variable of type *LocalBackend) as transfer.Backend value in argument to NewLockBackend: *LocalBackend does not implement transfer.Backend (wrong type for method Batch)
                have Batch(string, []transfer.Pointer) ([]transfer.BatchItem, error)
                want Batch(string, []transfer.Pointer, map[string]string) ([]transfer.BatchItem, error)
internal/local/backend.go:155:30: cannot use &localLockBackend{} (value of type *localLockBackend) as transfer.LockBackend value in variable declaration: *localLockBackend does not implement transfer.LockBackend (wrong type for method Create)
                have Create(string) (transfer.Lock, error)
                want Create(string, string) (transfer.Lock, error)
internal/local/backend.go:164:9: cannot use &localLockBackend{…} (value of type *localLockBackend) as transfer.LockBackend value in return statement: *localLockBackend does not implement transfer.LockBackend (wrong type for method Create)
                have Create(string) (transfer.Lock, error)
                want Create(string, string) (transfer.Lock, error)
internal/local/backend.go:172:9: impossible type assertion: l.backend.(*LocalBackend)
        *LocalBackend does not implement transfer.Backend (wrong type for method Batch)
                have Batch(string, []transfer.Pointer) ([]transfer.BatchItem, error)
                want Batch(string, []transfer.Pointer, map[string]string) ([]transfer.BatchItem, error)

I believe this has been fixed as of 66cd685.