You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A breaking change have been made to slices package in golang.org/x/exp module (slices.SortFunc in particular).
slices: update to current standard library version
Update x/exp/slices to the current standard library slices package,
while retaining the ability to use it with Go 1.18 through Go 1.20.
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. Being compatible with the
Go 1.21 package seems more useful for people not yet using 1.21,
as it will make the transition to 1.21 easier.
Currently there are no problems, but when updating dependent modules the following error occurs:
How to reproduce error
$ cat version.json{ "version": "v0.10.1"}
$ go test ./...? github.com/multiformats/go-multiaddr/multiaddr [no test files]ok github.com/multiformats/go-multiaddr 0.262sok github.com/multiformats/go-multiaddr/net 0.533s
$ go get -u golang.org/x/expgo: upgraded golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df => v0.0.0-20230725093048-515e97ebf090
$ go test ./...
# github.com/multiformats/go-multiaddr./multiaddr.go:223:25: type func(a Multiaddr, b Multiaddr) bool of func(a, b Multiaddr) bool {…} does not match inferred type func(a Multiaddr, b Multiaddr) int for func(a E, b E) intFAIL github.com/multiformats/go-multiaddr [build failed]FAIL github.com/multiformats/go-multiaddr/net [build failed]FAIL
A breaking change have been made to
slices
package ingolang.org/x/exp
module (slices.SortFunc
in particular).It is the comparison function, an argument of
slices.SortFunc
, that affects our package.func(a, b E) bool
vsfunc(a, b E) int
.Currently there are no problems, but when updating dependent modules the following error occurs:
How to reproduce error
Proposed fix
go-multiaddr/multiaddr.go
Line 223 in 07e6e8d
Note
Even if all other modules are updated, no further changes seem to be necessary at this stage.
Env info
The text was updated successfully, but these errors were encountered: