API changes should automatically be detected by x/tools/internal/imports after each major release. After 1.14, they were manually updated as per https://github.com/golang/go/issues/38464. This should be part of the release process (maybe x/build/cmd/releasebot?).

Comment From: gopherbot

Change https://golang.org/cl/246581 mentions this issue: internal/imports: update stdlib index for 1.15

Comment From: heschi

@golang/release might have something to say about this.

Comment From: gopherbot

Change https://golang.org/cl/293839 mentions this issue: internal/imports: update stdlib index for 1.16

Comment From: dmitshur

As a first step, let's make this a recurring early-in-cycle release-blocking issue, similar to #40705 and #36905, so that this task isn't missed.

(If it's viable to automate this task so it doesn't need to be done by hand every 6 months, please file a new issue for doing that work.)

I'll place it in Go 1.17 milestone now, and when CL 293839 is submitted, it can be moved to Go 1.18.

Comment From: heschi

Strictly speaking it would probably make it sense to do it shortly before the release, once the API has stabilized. But right after is fine too.

Comment From: dmitshur

@heschi Yep, that makes sense. The reason I've used this early-in-cycle path for now is the same reason I closed https://github.com/golang/go/issues/27155#issuecomment-779940755: we currently don't have a good system for tracking issues that aren't actionable until very late in a dev cycle. When we do, we can improve this task so it happens late in cycle instead.

Comment From: cagedmantis

This issue is currently labeled as early-in-cycle for Go 1.18. That time is now, so this is a friendly ping so the issue is looked at again.

Comment From: gopherbot

Change https://golang.org/cl/344629 mentions this issue: internal/imports: update stdlib index for 1.17

Comment From: dmitshur

CL 344629 updated the index for 1.17, so moving this to next milestone (with early-in-cycle) so this gets pinged when 1.18 is out.

Comment From: gopherbot

This issue is currently labeled as early-in-cycle for Go 1.19. That time is now, so a friendly reminder to look at it again.

Comment From: gopherbot

Change https://go.dev/cl/393379 mentions this issue: internal/imports: update stdlib index for 1.18

Comment From: findleyr

I'll do this now. How do we feel about enforcing this with a test? And if we want to go that route, should the test start failing as soon as new APIs are added to the standard library, or once the standard library is released?

CC @golang/tools-team

Comment From: findleyr

A better option for automation may be to create a release blocking bug associated with each major Go version.

Comment From: gopherbot

Change https://go.dev/cl/422654 mentions this issue: internal/imports: update stdlib index for 1.19

Comment From: gopherbot

This issue is currently labeled as early-in-cycle for Go 1.20. That time is now, so a friendly reminder to look at it again.

Comment From: findleyr

This was done for Go 1.20, so I bumped to the Go1.21 milestone.

Would be better to have separate issues but in the meantime I think this is set up for the next cycle.

Comment From: gopherbot

Change https://go.dev/cl/464715 mentions this issue: internal/imports: use go/packages instead of cmd/api to compute symbols

Comment From: gopherbot

Change https://go.dev/cl/464875 mentions this issue: internal/imports: update stdlib index for Go 1.20

Comment From: dmitshur

CL 464342 and CL 464875 regenerated the index after the Go 1.20 release. Moving to the next milestone since this won't need attention until Go 1.21 is out.

Note that relui will be generating these CLs automatically for future releases (implemented in #54377—thanks @dle8!), so it's not necessary to do it manually anymore.

Comment From: heschi

Seems like we can close the issue now that it's automated. No need to remind ourselves.

Comment From: gopherbot

Change https://go.dev/cl/517075 mentions this issue: internal/imports: update stdlib index for Go 1.21.0

Comment From: gopherbot

Change https://go.dev/cl/562277 mentions this issue: internal/imports: update stdlib index for Go 1.22.0

Comment From: gopherbot

Change https://go.dev/cl/572777 mentions this issue: internal/relui: update major release x/tools generate sequence

Comment From: gopherbot

Change https://go.dev/cl/571276 mentions this issue: internal/imports: remove obsolete go:generate directive

Comment From: gopherbot

Change https://go.dev/cl/605196 mentions this issue: internal/stdlib: update stdlib index for Go 1.23.0

Comment From: gopherbot

Change https://go.dev/cl/648556 mentions this issue: internal/stdlib: update stdlib index for Go 1.24.0

Comment From: gopherbot

Change https://go.dev/cl/694975 mentions this issue: internal/task: use GenerateAutoSubmitChange in CreateUpdateStdlibIndexCL