On Mon, Dec 22, 2025 at 1:37 PM Tom Wiesing <[email protected]> wrote:
>
> It seems that behavior has changed - errors.Join now returns a single error 
> if that error implements Unwrap() []error [1].
>
> This seems contra to the documentation, which says [2]:
>
> // Join returns an error that wraps the given errors.
>
> And also the definition of "wraps"  which doesn't include an error wrapping 
> itself:
>
> // If e.Unwrap() returns a non-nil error w or a slice containing w,
> // then we say that e wraps w.
>
> I've also got an example on the playground at [4].
>
> [1] 
> https://cs.opensource.google/go/go/+/refs/tags/go1.25.5:src/errors/join.go;l=32
> [2] https://pkg.go.dev/[email protected]#Join
> [3] https://pkg.go.dev/[email protected]#pkg-overview
> [4] https://go.dev/play/p/ZWk1dwtQoDe
> On Saturday, August 2, 2025 at 6:36:04 PM UTC+2 [email protected] wrote:

It looks like that changed in the Go 1.25 release with
https://go.dev/cl/635115. I'm not sure what we should do about it.
Would you mind filing a bug report showing a program whose behavior
change between 1.24 and 1.25? Thanks.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcUmvnj8B%3DZAWRyR20BQY-buoE1SKXs4h7bjGsrv_M3rGA%40mail.gmail.com.

Reply via email to