Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goleak is no longer compatible with Go 1.5+ #85

Closed
Syuparn opened this issue Dec 7, 2022 · 2 comments · Fixed by #86
Closed

goleak is no longer compatible with Go 1.5+ #85

Syuparn opened this issue Dec 7, 2022 · 2 comments · Fixed by #86

Comments

@Syuparn
Copy link

Syuparn commented Dec 7, 2022

Readme explains this is compatible with Go 1.5+.
However, the latest version v1.2.0 only works on Go 1.18+.

Sample code:

package main

import (
	"testing"

	"go.uber.org/goleak"
)

func TestLeak(t *testing.T) {
	defer goleak.VerifyNone(t)
}
$ go version
go version go1.13.15 linux/amd64
$ go test
# go.uber.org/goleak
/go/pkg/mod/go.uber.org/goleak@v1.2.0/options.go:115:3: undefined: isTraceStack
note: module requires Go 1.18
FAIL    example.com/foo [build failed]

The previous version v1.1.12 works expectedly. This seems due to #79.
Is current version only compatible with Go 1.18+?

@rabbbit
Copy link
Contributor

rabbbit commented Dec 7, 2022

We follow the Go release policy: https://go.dev/doc/devel/release#policy

Each major Go release is supported until there are two newer major releases. For example, Go 1.5 was supported until the Go 1.7 release, and Go 1.6 was supported until the Go 1.8 release.

You'll need to upgrade or stick with v1.1.12 in the meantime.

I'll update the Readme.

rabbbit added a commit that referenced this issue Dec 7, 2022
Fixes #85

We're no longer compatible with pre 1.16  since #79.

I'm opting for removing the version rather than updating it to 1.18 since we already have go.mod for this. 

Adding a pointer to the Go release policy, but I also considered dropping the mentions altogether. Copied the copy from `zap`.
@Syuparn
Copy link
Author

Syuparn commented Dec 8, 2022

@rabbbit

I see. Thank you for your reply!

sywhang pushed a commit that referenced this issue Dec 16, 2022
Fixes #85

We're no longer compatible with pre 1.16  since #79.

I'm opting for removing the version rather than updating it to 1.18
since we already have go.mod for this.

Adding a pointer to the Go release policy, but I also considered
dropping the mentions altogether. Copied the copy from `zap`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants