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

x/tools/internal/imports: update stdlib index after every major Go release #38706

Closed
smasher164 opened this issue Apr 27, 2020 · 24 comments
Closed
Labels
early-in-cycle A change that should be done early in the 3 month dev cycle. NeedsFix The path to resolution is known, but the work has not been done. recurring Issues that should never be closed, but moved to the next milestone once fixed in the current one. release-blocker Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@smasher164
Copy link
Member

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

@smasher164 smasher164 added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 27, 2020
@gopherbot gopherbot added this to the Unreleased milestone Apr 27, 2020
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Apr 27, 2020
@gopherbot
Copy link

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

gopherbot pushed a commit to golang/tools that referenced this issue Aug 4, 2020
    $ go run mkstdlib.go

Updates golang/go#38706.

Change-Id: I9d1bba54c4f9a0369b1d088c00a2f0c3e4409806
Reviewed-on: https://go-review.googlesource.com/c/tools/+/246581
Run-TryBot: Akhil Indurti <aindurti@gmail.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
@heschi
Copy link
Contributor

heschi commented Feb 18, 2021

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

@gopherbot
Copy link

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

@dmitshur
Copy link
Contributor

dmitshur commented Feb 18, 2021

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.

@dmitshur dmitshur modified the milestones: Unreleased, Go1.17 Feb 18, 2021
@dmitshur dmitshur added early-in-cycle A change that should be done early in the 3 month dev cycle. NeedsFix The path to resolution is known, but the work has not been done. release-blocker and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Feb 18, 2021
@dmitshur dmitshur changed the title x/tools/internal/imports: automatically update stdlib index every major release x/tools/internal/imports: update stdlib index after every major Go release Feb 18, 2021
@heschi
Copy link
Contributor

heschi commented Feb 18, 2021

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.

@dmitshur dmitshur added the recurring Issues that should never be closed, but moved to the next milestone once fixed in the current one. label Feb 18, 2021
@dmitshur
Copy link
Contributor

dmitshur commented Feb 18, 2021

@heschi Yep, that makes sense. The reason I've used this early-in-cycle path for now is the same reason I closed #27155 (comment): 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.

gopherbot pushed a commit to golang/tools that referenced this issue Feb 19, 2021
    $ go run mkstdlib.go

Updates golang/go#38706.

Change-Id: I9d5bce3083d2a57eea2ea89c6a99a410ed169f05
Reviewed-on: https://go-review.googlesource.com/c/tools/+/293839
Run-TryBot: Akhil Indurti <aindurti@gmail.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Trust: Heschi Kreinick <heschi@google.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
@smasher164 smasher164 modified the milestones: Go1.17, Go1.18 Feb 19, 2021
rinchsan pushed a commit to rinchsan/gosimports that referenced this issue May 30, 2021
    $ go run mkstdlib.go

Updates golang/go#38706.

Change-Id: I9d5bce3083d2a57eea2ea89c6a99a410ed169f05
Reviewed-on: https://go-review.googlesource.com/c/tools/+/293839
Run-TryBot: Akhil Indurti <aindurti@gmail.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Trust: Heschi Kreinick <heschi@google.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
@cagedmantis
Copy link
Contributor

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.

@gopherbot
Copy link

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

gopherbot pushed a commit to golang/tools that referenced this issue Aug 24, 2021
    $ go run mkstdlib.go

Updates golang/go#38706.

Change-Id: I0ad28f7d5e1fec2d1ccc3bc0f01f43a7d2f0d817
Reviewed-on: https://go-review.googlesource.com/c/tools/+/344629
Run-TryBot: Akhil Indurti <aindurti@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
rinchsan pushed a commit to rinchsan/gosimports that referenced this issue Sep 17, 2021
    $ go run mkstdlib.go

Updates golang/go#38706.

Change-Id: I0ad28f7d5e1fec2d1ccc3bc0f01f43a7d2f0d817
Reviewed-on: https://go-review.googlesource.com/c/tools/+/344629
Run-TryBot: Akhil Indurti <aindurti@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
rinchsan pushed a commit to rinchsan/gosimports that referenced this issue Oct 9, 2021
    $ go run mkstdlib.go

Updates golang/go#38706.

Change-Id: I0ad28f7d5e1fec2d1ccc3bc0f01f43a7d2f0d817
Reviewed-on: https://go-review.googlesource.com/c/tools/+/344629
Run-TryBot: Akhil Indurti <aindurti@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
@dmitshur
Copy link
Contributor

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.

@dmitshur dmitshur modified the milestones: Go1.18, Go1.19 Oct 27, 2021
@gopherbot
Copy link

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

gopherbot pushed a commit to golang/tools that referenced this issue Aug 10, 2022
Updates golang/go#38706

Change-Id: I361c8862b4dcd5215ea0574715908f552f937e6c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/422654
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
@findleyr findleyr removed their assignment Aug 10, 2022
@gopherbot
Copy link

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.

@findleyr findleyr modified the milestones: Go1.20, Go1.21 Aug 12, 2022
@findleyr
Copy link
Contributor

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.

rinchsan pushed a commit to rinchsan/gosimports that referenced this issue Aug 14, 2022
Updates golang/go#38706.

Change-Id: I3e99e4dbe731b51a24e84c4381f440d3bc4cd4e4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/393379
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
rinchsan pushed a commit to rinchsan/gosimports that referenced this issue Aug 14, 2022
Updates golang/go#38706

Change-Id: I361c8862b4dcd5215ea0574715908f552f937e6c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/422654
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
@gopherbot
Copy link

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

gopherbot pushed a commit to golang/tools that referenced this issue Feb 2, 2023
The API of syscall/js package is generated by reusing cmd/api. That has
stopped being a runnable command after an internal refactor in Go 1.20.
Since cmd/api was never really supported or meant to be used outside of
GOROOT, switch to using go/packages and compute the API more directly
ourselves.

Also use the same approach to generate the API of package unsafe (whose
API is also not present in GOROOT/api files at this time) instead of a
fixed list that needs manual maintenance. This adds Add and Slice that
were added to package unsafe in Go 1.17. It also removes ArbitraryType,
since that symbol isn't a part of package unsafe's API but used in its
documentation—it seems like an oversight that it was added in CL 24463.

This CL intentionally leaves out unsafe's SliceData, String, StringData
that were added in Go 1.20, so I can test out the new relui workflow to
send a CL that regenerates this package.

Fixes golang/go#58245.
For golang/go#38706.

Change-Id: Ibe0d89bf0469691bd16e0d0f501e3762256f2239
Reviewed-on: https://go-review.googlesource.com/c/tools/+/464715
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
@gopherbot
Copy link

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

gopherbot added a commit to golang/tools that referenced this issue Feb 2, 2023
For golang/go#38706.

Change-Id: Iefd858ec1848481a26d6bb88076ff8a3c2f8a818
Reviewed-on: https://go-review.googlesource.com/c/tools/+/464875
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Auto-Submit: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Gopher Robot <gobot@golang.org>
@dmitshur
Copy link
Contributor

dmitshur commented Feb 2, 2023

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.

@dmitshur dmitshur modified the milestones: Go1.21, Go1.22 Feb 2, 2023
@heschi
Copy link
Contributor

heschi commented Feb 6, 2023

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

@heschi heschi closed this as completed Feb 6, 2023
rinchsan pushed a commit to rinchsan/gosimports that referenced this issue Feb 19, 2023
The API of syscall/js package is generated by reusing cmd/api. That has
stopped being a runnable command after an internal refactor in Go 1.20.
Since cmd/api was never really supported or meant to be used outside of
GOROOT, switch to using go/packages and compute the API more directly
ourselves.

Also use the same approach to generate the API of package unsafe (whose
API is also not present in GOROOT/api files at this time) instead of a
fixed list that needs manual maintenance. This adds Add and Slice that
were added to package unsafe in Go 1.17. It also removes ArbitraryType,
since that symbol isn't a part of package unsafe's API but used in its
documentation—it seems like an oversight that it was added in CL 24463.

This CL intentionally leaves out unsafe's SliceData, String, StringData
that were added in Go 1.20, so I can test out the new relui workflow to
send a CL that regenerates this package.

Fixes golang/go#58245.
For golang/go#38706.

Change-Id: Ibe0d89bf0469691bd16e0d0f501e3762256f2239
Reviewed-on: https://go-review.googlesource.com/c/tools/+/464715
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
rinchsan pushed a commit to rinchsan/gosimports that referenced this issue Feb 19, 2023
For golang/go#38706.

Change-Id: Iefd858ec1848481a26d6bb88076ff8a3c2f8a818
Reviewed-on: https://go-review.googlesource.com/c/tools/+/464875
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Auto-Submit: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Gopher Robot <gobot@golang.org>
@gopherbot
Copy link

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

gopherbot added a commit to golang/tools that referenced this issue Aug 8, 2023
For golang/go#38706.

Change-Id: I278b5edd7caf6ddb0585a3ea8f47777753457ddf
Reviewed-on: https://go-review.googlesource.com/c/tools/+/517075
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Gopher Robot <gobot@golang.org>
Run-TryBot: Gopher Robot <gobot@golang.org>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
@gopherbot
Copy link

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

gopherbot added a commit to golang/tools that referenced this issue Feb 6, 2024
For golang/go#38706.

Change-Id: Ib2e9ce03cc86dd74e2498bf462c168169ae97d7a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/562277
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
@gopherbot
Copy link

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

@gopherbot
Copy link

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

gopherbot pushed a commit to golang/build that referenced this issue Mar 19, 2024
CL 567837 extracted the stdlib manifest from x/tools/internal/imports
to x/tools/internal/stdlib. That is the new package that will need to
be regenerated every 6 months after each major Go release.

Update the relui task that automated that recurring work accordingly.

For golang/go#46136.
For golang/go#38706.

Change-Id: I9705ac881a18a5e7b03188228eadfaccf816aaca
Reviewed-on: https://go-review.googlesource.com/c/build/+/572777
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
gopherbot pushed a commit to golang/tools that referenced this issue Mar 19, 2024
CL 567837 deleted mkstdlib.go (a generator) and zstdlib.go (its output).

For golang/go#46136.
For golang/go#38706.

Change-Id: If5623e3ab014c2fee63b1d058c726ea5acb06aa2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/571276
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
early-in-cycle A change that should be done early in the 3 month dev cycle. NeedsFix The path to resolution is known, but the work has not been done. recurring Issues that should never be closed, but moved to the next milestone once fixed in the current one. release-blocker Tools This label describes issues relating to any tools in the x/tools repository.
Projects
Development

No branches or pull requests

7 participants