Build currently fails

Please describe what you are doing to trigger the bug:
go get -v -u github.com/gilbertchen/duplicacy/...

Please describe what you expect to happen (but doesn’t):
create duplicacy binary

Please describe what actually happens (the wrong behaviour):
Fails with:

package github.com/klauspost/cpuid/v2: cannot find package "github.com/klauspost/cpuid/v2" in any of:

It has been moved here: https://github.com/klauspost/cpuid/tree/v2

Further errors:

..\..\..\golang.org\x\crypto\ed25519\ed25519.go:20:2: cannot find package "crypto/ed25519" in any of:
..\..\Azure\go-autorest\autorest\adal\token.go:40:2: cannot find package "github.com/golang-jwt/jwt/v4" in any of:

jwt is now at v4 and can thus just reference the root.

Looks like I had an outdated go version, after upgrading I don’t get the above errors anymore, but instead:

go\pkg\mod\github.com\gilbertchen\duplicacy@v2.7.2+incompatible\duplicacy\duplicacy_main.go:124:26: context.App.Writer undefined (type *cli.App has no field or method Writer)
go\pkg\mod\github.com\gilbertchen\duplicacy@v2.7.2+incompatible\duplicacy\duplicacy_main.go:249:26: context.App.Writer undefined (type *cli.App has no field or method Writer)
go\pkg\mod\github.com\gilbertchen\duplicacy@v2.7.2+incompatible\duplicacy\duplicacy_main.go:381:27: context.App.Writer undefined (type *cli.App has no field or method Writer)
go\pkg\mod\github.com\gilbertchen\duplicacy@v2.7.2+incompatible\duplicacy\duplicacy_main.go:392:27: context.App.Writer undefined (type *cli.App has no field or method Writer)
go\pkg\mod\github.com\gilbertchen\duplicacy@v2.7.2+incompatible\duplicacy\duplicacy_main.go:404:28: context.App.Writer undefined (type *cli.App has no field or method Writer)
go\pkg\mod\github.com\gilbertchen\duplicacy@v2.7.2+incompatible\duplicacy\duplicacy_main.go:414:28: context.App.Writer undefined (type *cli.App has no field or method Writer)
go\pkg\mod\github.com\gilbertchen\duplicacy@v2.7.2+incompatible\duplicacy\duplicacy_main.go:548:26: context.App.Writer undefined (type *cli.App has no field or method Writer)
go\pkg\mod\github.com\gilbertchen\duplicacy@v2.7.2+incompatible\duplicacy\duplicacy_main.go:641:26: context.App.Writer undefined (type *cli.App has no field or method Writer)
go\pkg\mod\github.com\gilbertchen\duplicacy@v2.7.2+incompatible\duplicacy\duplicacy_main.go:734:26: context.App.Writer undefined (type *cli.App has no field or method Writer)
go\pkg\mod\github.com\gilbertchen\duplicacy@v2.7.2+incompatible\duplicacy\duplicacy_main.go:795:26: context.App.Writer undefined (type *cli.App has no field or method Writer)
go\pkg\mod\github.com\gilbertchen\duplicacy@v2.7.2+incompatible\duplicacy\duplicacy_main.go:795:26: too many errors

1 Like

Now it fails with:

C:\Users\df-mi\go\src\github.com\gilbertchen\duplicacy\src\duplicacy_swiftstorage.go:132:31: not enough arguments in call to connection.Authenticate
        have ()
        want ("context".Context)
C:\Users\df-mi\go\src\github.com\gilbertchen\duplicacy\src\duplicacy_swiftstorage.go:137:34: not enough arguments in call to connection.Container
        have (string)
        want ("context".Context, string)
C:\Users\df-mi\go\src\github.com\gilbertchen\duplicacy\src\duplicacy_swiftstorage.go:171:47: not enough arguments in call to storage.connection.ObjectsAll
        have (string, *swift.ObjectsOpts)
        want ("context".Context, string, *swift.ObjectsOpts)
C:\Users\df-mi\go\src\github.com\gilbertchen\duplicacy\src\duplicacy_swiftstorage.go:193:40: not enough arguments in call to storage.connection.ObjectDelete
        have (string, string)
        want ("context".Context, string, string)
C:\Users\df-mi\go\src\github.com\gilbertchen\duplicacy\src\duplicacy_swiftstorage.go:198:38: not enough arguments in call to storage.connection.ObjectMove
        have (string, string, string, string)
        want ("context".Context, string, string, string, string)
C:\Users\df-mi\go\src\github.com\gilbertchen\duplicacy\src\duplicacy_swiftstorage.go:210:45: not enough arguments in call to storage.connection.Object
        have (string, string)
        want ("context".Context, string, string)
C:\Users\df-mi\go\src\github.com\gilbertchen\duplicacy\src\duplicacy_swiftstorage.go:226:47: not enough arguments in call to storage.connection.ObjectOpen
        have (string, string, bool, nil)
        want ("context".Context, string, string, bool, swift.Headers)
C:\Users\df-mi\go\src\github.com\gilbertchen\duplicacy\src\duplicacy_swiftstorage.go:237:39: not enough arguments in call to storage.connection.ObjectPut
        have (string, string, *RateLimitedReader, bool, string, string, nil)
        want ("context".Context, string, string, io.Reader, bool, string, string, swift.Headers)

Did you try the next comment in that thread?

1 Like

Thank you very much! I also got it to work by adding the missing context.

Running go 1.19.6, I got the same error with the go get command:

cannot find package "github.com/golang-jwt/jwt/v4" in any of:

but I was successful with the direct build workflow executing:

go build duplicacy/duplicacy_main.go