-
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 |
[email protected] dependency doesn't seem enough. I still see
It is seems to be fixed with [email protected] though. Unfortunately I wasn't able to reproduce this with a simple example yet. |
[email protected] 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 <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Robert Findley <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]>
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: