-
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/text/cmd/gotext: dependency of x/tools is too old for Go 1.18 #52552
Comments
@rsc this is gotext issue 1/2 |
The panic indicates that the go/ssa package doesn't know how what to do with type parameters. There has been some very recent work by @timothy-king in that package to add support. I don't know what state it's in, but I notice that updating x/text's version of x/tools to the latest (untagged) commit does avoid the crash on these examples.
|
Change https://go.dev/cl/402254 mentions this issue: |
Also see #50558 |
/cc @mpvl |
tools@0.1.11 dependency doesn't seem enough. I still see
It is seems to be fixed with tools@0.1.12 though. Unfortunately I wasn't able to reproduce this with a simple example yet. |
tools@0.1.12 contains a fix for #52834 which fixes exactly the issue mentioned in my previous comment |
go get -u golang.org/x/tools go mod tidy For golang/go#50558 Fixes golang/go#52552 Change-Id: I233aa90922fc23800563fd05beb4be6f7e87cf5b Reviewed-on: https://go-review.googlesource.com/c/text/+/402254 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com>
With Go 1.18.1, it is not possible to run
go run golang.org/x/text/cmd/gotext@latest extract
(latest maps to v0.3.7 in this case). The problem seems to be a too old version of x/tools:This bug happens on every example, even if the code does not depend on generics. One minimal example:
Explicitly depending on a newer version of x/tools in the go.mod file solves the problem for programs that do not depend on generics.
The text was updated successfully, but these errors were encountered: