-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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/go/gcexportdata: simplify implementation assuming go >= 1.21 #70651
Comments
Related Issues (Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
Change https://go.dev/cl/633115 mentions this issue: |
Proposal golang/go#68898 was accepted. gcexportdata.Read now supports tip and the latest two releases. FindExportData is needed only to support Read and can thus have the same support policy. Since go1.21, the only files the compiler produces with the header "go object " are either in archive files or do not contain exportdata (cmd/asm). It is therefore safe for FindExportData to require the files to be ar files. Updates golang/go#70651 Change-Id: Iec6703da6768198524e174824b0b05f95b96db90 Reviewed-on: https://go-review.googlesource.com/c/tools/+/633115 Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Findley <rfindley@google.com> Commit-Queue: Tim King <taking@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change https://go.dev/cl/633279 mentions this issue: |
Change https://go.dev/cl/633278 mentions this issue: |
Change https://go.dev/cl/633296 mentions this issue: |
Updates FindExportData to return a non-negative size when there is no error. This can only happen if the archive file is malformed. Updates golang/go#70651 Change-Id: Ia422651cd31fba83a260cf1be600ffd134012a01 Reviewed-on: https://go-review.googlesource.com/c/tools/+/633278 Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Tim King <taking@google.com>
FindExportData now returns an error if the header indicating the beginning of the export data is not "$$B\n". (Historically "$$\n" was also used for non-binary export data.) The signature of FindExportData no longer returns hdr as it is redundant. This also simplifies internal/gcimporter.Import using this new assumption. Updates golang/go#70651 Change-Id: I0d136d6c474ae6a7bfc2baeb33c22fd412711452 Reviewed-on: https://go-review.googlesource.com/c/tools/+/633279 Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Tim King <taking@google.com> Reviewed-by: Robert Findley <rfindley@google.com>
Change https://go.dev/cl/633435 mentions this issue: |
Change https://go.dev/cl/633708 mentions this issue: |
Change https://go.dev/cl/633716 mentions this issue: |
Change https://go.dev/cl/633712 mentions this issue: |
Change https://go.dev/cl/633659 mentions this issue: |
Change https://go.dev/cl/633657 mentions this issue: |
Change https://go.dev/cl/633658 mentions this issue: |
Change https://go.dev/cl/633660 mentions this issue: |
Remove the bytes for the end-of-section marker "\n$$\n" from the end of the exportdata by descreasing the returned size appropriately. This marker is not a part of the export data so it should be removed. Updates the unified IR reader to not expect the marker to be present. Updates golang/go#70651 Change-Id: Id3324ff21162d80f8e3d1c9792e9157b01ae1a3f Reviewed-on: https://go-review.googlesource.com/c/tools/+/633296 Reviewed-by: Robert Findley <rfindley@google.com> Commit-Queue: Tim King <taking@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Removes support for the indexed binary format from the test only function Import. Additionally makes Import more similar to go/internal/gcimporter.Import by taking a token.FileSet argument. Updates golang/go#70651 Change-Id: I39f120adc554278adb3d114194c27fd5906985a6 Reviewed-on: https://go-review.googlesource.com/c/tools/+/633435 Commit-Queue: Tim King <taking@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com>
Adds an internal copy of the GOROOT/src/cmd/internal/archive.ReadHeader to x/tools. This replaces readGopackHeader. The result is one less different implementation of reading an archive header between GOROOT and x/tools. Updates golang/go#70651 Change-Id: I69028da6472d6b06a613b554158301894326e735 Reviewed-on: https://go-review.googlesource.com/c/tools/+/633657 Commit-Queue: Tim King <taking@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com>
Change https://go.dev/cl/634518 mentions this issue: |
Moves FindPkg and related variables from gcimporter.go to exportdata.go. This is a part of minimizing the code delta between internal/gcimporter and GOROOT/src/internal/exportdata. Updates golang/go#70651 Change-Id: I74d2ba2085d0b034ff9f98f7cae17a2231ae3a6c Reviewed-on: https://go-review.googlesource.com/c/tools/+/634518 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com> Commit-Queue: Tim King <taking@google.com>
Synchronizes the implementation of FindPkg with the implementation of FindPkg in $GOROOT/src/internal/exportdata/exportdata.go. This adds an error return value. Updates golang/go#70651 Change-Id: If0295b6d396ffca30ee75d958a50aa7f5b93848e Reviewed-on: https://go-review.googlesource.com/c/tools/+/633658 Commit-Queue: Tim King <taking@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com>
Copies functions from GOROOT/internal/exportdata as they are. Only local modification is to avoid saferio. Updates golang/go#70651 Change-Id: If2f4e503f69897c51b708f995dad2720b9f59e8d Reviewed-on: https://go-review.googlesource.com/c/tools/+/633659 Reviewed-by: Robert Findley <rfindley@google.com> Commit-Queue: Tim King <taking@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This is a tracking issue to simplify the implementation of x/tools/{go/gcexportdata,internal/gcimporter} since the acceptance of proposal #68898. These can now assume exportdata only comes from go versions >= 1.21.
The text was updated successfully, but these errors were encountered: