ProtonMail / go-proton-api

Proton API library used by Go-based clients and tools
MIT License
122 stars 16 forks source link

feat: update golang.org/x/exp dependency and fix breaking changes #140

Open krostar opened 8 months ago

krostar commented 8 months ago

Hello!

Since this update of the golang/exp project, the slices package has a breaking change.

The commit message of the golang/exp package, introducing the regression, is explicit about it.

Note that this changes some of the sorting functions to use a comparison function rather than a less function. We don't promise backward compatibility in x/exp packages.

As far as I know, there is no urgency to update the golang/exp package version.

Step to reproduce the breaking change:

go get -u golang.org/x/exp
go test ./...
# github.com/ProtonMail/go-proton-api
./address.go:21:33: type func(a Address, b Address) bool of func(a, b Address) bool {…} does not match inferred type func(a Address, b Address) int for func(a E, b E) int
?       github.com/ProtonMail/go-proton-api/server/cmd/client   [no test files]
?       github.com/ProtonMail/go-proton-api/server/proto    [no test files]
FAIL    github.com/ProtonMail/go-proton-api [build failed]
FAIL    github.com/ProtonMail/go-proton-api/server [build failed]
FAIL    github.com/ProtonMail/go-proton-api/server/backend [build failed]
FAIL

Thank you for exposing and maintaining the proton api client.

zoop-btc commented 1 month ago

would be nice to get this fix in