was v2 deleted?
pkg.go.dev has a relatively recent stable v2: https://pkg.go.dev/github.com/creack/pty/[email protected]
There are newer v1 versions: https://pkg.go.dev/github.com/creack/pty?tab=versions
I also cannot find the tag for v2 in this repo anymore.
What happened? Did v2 happen by mistake? If that's the case, you might want to retract that v2 version so that cmd/go and other tools no longer think it's the latest stable version. See https://go.dev/ref/mod#go-mod-file-retract.
v2 is a preview, it will live once #155 gets merged with windows support (and a breaking change)
Could you provide more detail on which context results in go thinking v2 is the latest stable version?
Using Docker to make sure we start from a brand new environment, I get v1.1.21 as latest:
$> docker run -it --rm golang:latest bash -c 'mkdir a && cd a && go mod init a && go get github.com/creack/pty@latest'
go: creating new go.mod: module a
go: downloading github.com/creack/pty v1.1.21
go: added github.com/creack/pty v1.1.21
And on pkg.go.dev, https://pkg.go.dev/github.com/creack/pty points to that version too. I do see the mention "a v2 exists", which indeed could be confusing. As we plan to merge #155 soon and publish the v2, I don't think it is too much a big deal, but let me know if I am wrong.
go get github.com/creack/pty@latest will never fetch v2, because it's a different import path. go get github.com/creack/pty/v2@latest will see it as a stable version, and I found it via https://github.com/icholy/gomajor. pkg.go.dev lists it too, per the above, and the "highest tagged major version is v2" warning is a strong indicator that users should likely look at that.
If v2 was meant to be a preview, then perhaps the version should have been an alpha or beta, then the tooling wouldn't point stable v1 users towards v2 :) If you will solve this soon, then no problem.
Thanks for the details.
I didn't push an alpha as I never advertised the tag, I hoped that nobody would even want to try pty/v2, but indeed, being mentioned on the docs, it is an issue.
If the full v2 doesn't go live by year's end, I'll retract it.
No rush, this was more of an FYI. Happy holidays :)
Heck, it seems now v1.1.22 is tagged with v2 in go.mod.
go get github.com/creack/[email protected]
go: github.com/creack/[email protected]: invalid version: go.mod has post-v1 module path "github.com/creack/pty/v2" at revision v1.1.22
Sorry about that. v1.1.22 deleted, v1.1.23 published.