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
go/types, cmd/compile/internal/types2: ensure that Named.Orig is indempotent #46794
Comments
noder/writer.go code: go/src/cmd/compile/internal/noder/writer.go Lines 235 to 248 in dd95a4e
types2/typestring.go code: go/src/cmd/compile/internal/types2/typestring.go Lines 362 to 379 in 1ba2074
|
Checking in on this issue as it's labeled a release blocker for Go 1.18. Is there any update? |
Leaving as release blocker as this might hide more serious issues. |
Checking in on this as a release-blocking issue. Are there any updates? |
No updates, other than it's near the top of my queue? This got push backed by not-okay-after-beta1 release blockers. We suspect there isn't a bug here any more, but I need to prove it. |
Will address this by next week. |
Removing this from release-blockers. Still something we need to investigate but we have no evidence that this is causing us troubles at the moment. |
The loop for typ.orig != typ {
typ = typ.orig
} doesn't exist anymore in It's not clear that this is still a problem. Should investigate early in 1.19 development by trying to identify code for which the loop in the unified noder triggers. |
This issue is currently labeled as early-in-cycle for Go 1.19. |
[edit: this turned out to be a separate issue - see https://go.dev/cl/393436] Possibly related reproducer (extracted from https://storage.googleapis.com/go-build-log/a42378ee/linux-amd64-unified_c6889d3a.log):
The build crashes with a panic:
The root cause is that |
This seems like a separate bug, right? Am I missing some way in which that implies that Origin is not idempotent? |
It may be a separate bug, or it may be related in some cases. I don't know yet for sure. |
Change https://go.dev/cl/393368 mentions this issue: |
It turns out that this is a separate issue (https://go.dev/cl/393436). |
For #46794 Change-Id: I19edc19640a2dfa6bc7504dd8e1742a261ba29f1 Reviewed-on: https://go-review.googlesource.com/c/go/+/393368 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
@griesemer This issue is in the 1.19 milestone. Should it be 1.20? Backlog? Thanks. |
@findleyr is this still relevant? |
I don't think this is relevant anymore, but defer to mdempsky to confirm that this no longer repros. Bumping to 1.20, since that's when we plan to land unified IR. |
This issue is currently labeled as early-in-cycle for Go 1.20. |
I think this has been fixed too. In unified IR I added extra asserts to make sure it's idempotent and they're passing. I'll reopen if I run into any issues again. Thanks! |
In both unified IR and types2, an operation that seems useful is to take an instantiated
Named
and decompose it into the (original) TypeName and type arguments.Currently there's a
Named.Orig
method, but it's not always the case thatNamed.Orig
is idempotent. E.g., there are at least test cases where it's necessary to apply it twice.This is a placeholder issue to look into this further before Go 1.18.
/cc @griesemer @findleyr
The text was updated successfully, but these errors were encountered: