go-pkgz / auth

Authenticator via oauth2, direct, email and telegram
https://go-pkgz.umputun.dev/auth/
MIT License
1.07k stars 84 forks source link

Dependency error while downloading auth on Go 1.20 #168

Closed Szelmat closed 1 year ago

Szelmat commented 1 year ago

I have ran into the following error while trying to run go get github.com/go-pkgz/auth on Go 1.20, even running it in an empty Go project (on Windows):

go: downloading golang.org/x/oauth2 v0.6.0
...
panic: internal error: can't find reason for requirement on github.com/golang/snappy@v0.0.1

goroutine 1 [running]:
cmd/go/internal/modget.(*resolver).updateBuildList.func1({{0xc00097f050, 0x18}, {0xc00030c190, 0x6}})
        c:/go/src/cmd/go/internal/modget/get.go:1760 +0xd4
cmd/go/internal/modget.(*resolver).updateBuildList(0xc0001e2000, {0x12b95e8, 0xc000024040}, {0x0, 0x0, 0x0})
        c:/go/src/cmd/go/internal/modget/get.go:1765 +0x54c
cmd/go/internal/modget.(*resolver).applyUpgrades(0xc0001e2000, {0x12b95e8, 0xc000024040}, {0x0?, 0x0, 0xc00012dd70?})
        c:/go/src/cmd/go/internal/modget/get.go:1312 +0x465
cmd/go/internal/modget.runGet({0x12b95e8, 0xc000024040}, 0xc00001d110?, {0xc000078060, 0x1, 0x2})
        c:/go/src/cmd/go/internal/modget/get.go:351 +0x458
main.invoke(0x15d4e40, {0xc000078050, 0x2, 0x3})
        c:/go/src/cmd/go/main.go:225 +0x3d9
main.main()
        c:/go/src/cmd/go/main.go:179 +0x7ae

It seems like a package compatibility issue, let me know if this error can be reproduced on other machines.

umputun commented 1 year ago

try to run go get -u github.com/golang/snappy github.com/google/uuid first

Szelmat commented 1 year ago

Surely enough, it seems to work, thank you!

umputun commented 1 year ago

Yeah, I'm not sure what the issue is, found a few tickets in go's repo describing a similar problem. We are migrating this library to the recent 1.20 (there is a branch for this) and this one should be fine without those tricks

Szelmat commented 1 year ago

That's good news, thanks for the heads up! I actually just decided to get started setting up my auth with this package so it will be quite useful once it gets merged.