-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
exportdata: support type parameterized aliases #68778
Comments
Change https://go.dev/cl/604099 mentions this issue: |
Change https://go.dev/cl/604102 mentions this issue: |
Change https://go.dev/cl/604635 mentions this issue: |
Change https://go.dev/cl/604596 mentions this issue: |
Change https://go.dev/cl/605655 mentions this issue: |
Flips the pkgReader.enableAlias flag to true when reading unified IR. This was disabled while resolving #66873. This resolves the TODO to flip it back to true. Updates #66873 Updates #68778 Change-Id: Ifd52b0f9510d6bcf151de1c9a18d71ab548c14e4 Reviewed-on: https://go-review.googlesource.com/c/go/+/604099 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
Change https://go.dev/cl/606035 mentions this issue: |
Improves the ureader panic message to tell users what package has the problem and to update their tools. Updates golang/go#68778 Change-Id: Ia19f43aa2301627109abbebac0ddc7c5666ffd9a Reviewed-on: https://go-review.googlesource.com/c/tools/+/604596 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/606335 mentions this issue: |
…iases Add support for importing a new 'B' tag for type parameters aliases in the indexed data format. Updates #68778 Change-Id: I3bd82870d4c4619a3771de30baf6d54f6ee5959e Reviewed-on: https://go-review.googlesource.com/c/go/+/604635 Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
Adds a -gomodversion flag to testdir. This sets the go version in generated go.mod files. This is just runindir tests at the moment. This is a building block so that tests can be written for exported type parameterized aliases (like reproducing #68526). This also adds a test that uses this feature. A type parameterized alias is used so aliastypeparams and gotypesalias must be enabled. gotypesalias is enabled by the go module version. The alias is not exported and will not appear in exportdata. The test shows the package containing the alias can be imported. This encapsulates the level of support of type parameterized aliases in 1.23. Updates #68526 Updates #68778 Change-Id: I8e20df6baa178e1d427d0fff627a16714d9c3b18 Reviewed-on: https://go-review.googlesource.com/c/go/+/604102 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Austin Clements <austin@google.com>
Change https://go.dev/cl/607235 mentions this issue: |
Adds a new Version type to pkgbits to represent the version of the bitstream. Versions let readers and writers know when different data is expected to be present or not in the bitstream. These different pieces of data are called Fields, as an analogy with fields of a struct. Fields can be added, removed or changed in a Version. Extends Encoder and Decoder to report which version they are. Updates #68778 Change-Id: Iaffa1828544fb4cbc47a905de853449bc8e5b91f Reviewed-on: https://go-review.googlesource.com/c/go/+/605655 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Removes 'has init' and 'derived func instance' fields from unified IR starting with V2. This should be a no-op at the moment as the writer is hardwired to create V1. Updates #68778 Change-Id: I84a606cbc27cd6d8bd6eee2aff44c89f4aa7413c Reviewed-on: https://go-review.googlesource.com/c/go/+/606035 Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change https://go.dev/cl/607495 mentions this issue: |
Change https://go.dev/cl/607535 mentions this issue: |
Move the documentation for indexed export data format from $GOROOT/src/cmd/compile/internal/typecheck/iexport.go to x/tools/internal/gcimporter/iexport.go . This is the only current writer of this format. Updates golang/go#68778 Updates golang/go#68898 Change-Id: I365f56315d03affc5860cf407ea6e3d0caa1a88e Reviewed-on: https://go-review.googlesource.com/c/tools/+/607495 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Alan Donovan <adonovan@google.com>
Change https://go.dev/cl/607498 mentions this issue: |
Adds a type parameters argument to NewAliases and updates all usage locations. Also adds a unit test that creates a type parameterized alias. Updates golang/go#68778 Change-Id: I5e3e76a5f597cf658faa9036319eded33eeb9286 Reviewed-on: https://go-review.googlesource.com/c/tools/+/607535 Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Writes the field for type parameter names for aliases when the bitstream is >= V2. This is a no-op at the moment as the writer is hardwired to V1. Updates #68778 Change-Id: I5887e3608239b9a6a47e3cc21cacb75b84e1d186 Reviewed-on: https://go-review.googlesource.com/c/go/+/607235 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
…rmat Adds support for type parameterized aliases in indexed format to gcimporter. Updates golang/go#68778 Change-Id: I475ab30fee8d1d273f678496a1c2c12b011b8a95 Reviewed-on: https://go-review.googlesource.com/c/tools/+/606335 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/608215 mentions this issue: |
Change https://go.dev/cl/608216 mentions this issue: |
So next CL can use it to remove unnecessary derivedInfo needed field. Updates #68778 Change-Id: Ia4e0f638beaf4a448fbf10a9aa1bc9425349a5e8 Reviewed-on: https://go-review.googlesource.com/c/go/+/608215 Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Tim King <taking@google.com> Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This field is unused since shape-based stenciling was added for Unified IR (CL 421821). The derived types information is now explicitly using derived-type dictionaries (CL 331829). This CL follows the pattern used in CL 606035. Updates #68778 Change-Id: Ie784b6443c0a651854bfbcebb8a5166b1481408b Reviewed-on: https://go-review.googlesource.com/c/go/+/608216 Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Tim King <taking@google.com>
Parse materialized aliases in indexed format. This was in https://go.dev/cl/574717 in x/tools. Updates #68778 Change-Id: I2f0871aeb5a2e74c803176001f178757766a4a0a Reviewed-on: https://go-review.googlesource.com/c/go/+/607498 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change https://go.dev/cl/608595 mentions this issue: |
Enables V2 unified IR bitstreams when GOEXPERIMENT aliastypeparams are enabled. Allows pkgbits.NewPkgEncoder to set the output version. Reenables support for writing V0 streams. Updates #68778 Updates #68526 Change-Id: I590c494d81ab7db148232ceaba52229068d1e986 Reviewed-on: https://go-review.googlesource.com/c/go/+/608595 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Change https://go.dev/cl/609317 mentions this issue: |
Change https://go.dev/cl/609316 mentions this issue: |
Copy over changes from GOROOT's internal/pkgbits for unified IR version V2. Updates golang/go#68778 Change-Id: I7813767e8c11a0d0227e2284af07ce0d86291476 Reviewed-on: https://go-review.googlesource.com/c/tools/+/609316 Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Copy over the ureader.go changes from GOROOT's go/internal/gcimporter. Adds a test that goes through gc export data. Updates golang/go#68778 Change-Id: Ie4b91dfdb1ab9f952631a34c3691dc84be8831a7 Reviewed-on: https://go-review.googlesource.com/c/tools/+/609317 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/610036 mentions this issue: |
Included in x/tools, 0.25.0 https://github.com/golang/tools/commits/v0.25.0/ |
Change https://go.dev/cl/613236 mentions this issue: |
For #68778 Change-Id: I4b39f84665262251ca014d3f5fe74b2fd434d51e Reviewed-on: https://go-review.googlesource.com/c/go/+/613236 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com> Commit-Queue: Tim King <taking@google.com> Reviewed-by: David Chase <drchase@google.com>
This issue is for tracking the work needed to enable type parameterized aliases (#46477) in the unified IR and 'i' export data formats.
Here are the know steps in an admissible order:
cmd/compile/internal/importer.ReadPackage
setspkgReader.enableAlias=true
.go1.14
incmd/internal/testdir
.{go/internal/gcimporter,cmd/compile/internal/importer}/iimport.go
support 'B' tag for type aliases with type parameters.Version
type tointernal/pkgbits
and documentation to better track version changes.internal/pkgbits.PkgDecoder.version
via{PkgDecoder,Decoder}.Version()
. Store the current version being written and expose it via{PkgEncoder,Encoder}.Version()
.{go/internal/gcimporter,cmd/compile/internal/importer}/ureader.go
andcmd/compile/internal/noder
.{go/internal/gcimporter,cmd/compile/internal/importer}/ureader.go
andcmd/compile/internal/noder
.typeParamNames()
in unified IR after version 2.aliastypeparams
GOEXPERIMENT is on.GOEXPERIMENT=aliastypeparams=1
for compiler and x/tools.GOEXPERIMENT=aliastypeparams=1
for compiler and x/tools.GOEXPERIMENT=aliastypeparams=1
for compiler and x/tools.aliastypeparams
GOEXPERIMENT default value to true.This will be updated as the plan updates.
@griesemer @dr2chase @findleyr @adonovan @mdempsky @cuonglm
The text was updated successfully, but these errors were encountered: