This issue tracks a remaining subset of the accepted proposal #61716. Specifically:
Once math/rand/v2 has shipped, we would tag and delete x/exp/rand. This would keep programs that already use x/exp/rand working (by reference to the tagged version or older versions of x/exp) but allow us to delete the code from the main branch of x/exp, making clear that development on it has ended.
math/rand/v2 shipped in Go 1.22, so by now it's available in all supported versions of Go. The golang.org/x/exp/rand package was already marked deprecated (issue #71373, CL 644475). As described in https://github.com/golang/go/issues/60557#issuecomment-1607487732, all that's left is:
- [ ] isolate it out into a nested module
- [ ] tag it as v0.1.0-deprecated (tag name would be
rand/v0.1.0-deprecated
) - [ ] delete it from the main branch of x/exp
Comment From: findleyr
Whoever does this needs to ensure that we update any third_party dependencies currently used inside Google to not depend on x/exp/rand. Otherwise, we won't be able to import x/exp after x/exp/rand is deleted.
(Google has a polyglot monorepo that isn't module-aware).