-
Notifications
You must be signed in to change notification settings - Fork 18.1k
cmd/go2go: importing k8s package makes compilation hang #46346
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
Comments
Given that the Nonetheless, CC @ianlancetaylor @griesemer in case they have anything to say about it. |
Thanks @mknyszek, I definitely understand if Is there a better way I should be trying to experiment with "real" generics support in Go with Kubernetes? |
The latest development is happening on the dev.typeparams branch - this branch is expected to become the master branch for the Go1.18 release. You could check out that branch, build Go from source, and then use that compiler, by calling: We'd be very interested in any bugs/crashes that you might run into. Thanks. |
I haven't looked into this, but the go2go tool does a source code parse of every package, and makes no attempt whatsoever at doing so efficiently. The chances that it will work with a large existing body of code are small. I'm going to close this issue because we aren't maintaining go2go any more. If someone wants to look into this and send a patch, I'll review it, but we aren't going to do anything ourselves. Sorry. |
Thanks for that clarification, I'll work against the dev.typeparams branch and let you know how it goes. Would it make sense to update the |
To be clear, neither is supported. But, yes, updating the go2go README makes sense at this point. Sent https://golang.org/cl/322192. |
Change https://golang.org/cl/322192 mentions this issue: |
For #46346 Change-Id: Iab050557efb96217477072eca42966662485b6b1 Reviewed-on: https://go-review.googlesource.com/c/go/+/322192 Trust: Ian Lance Taylor <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
n/a, not released
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I ran main.go2:
(sometimes longer if it actually has to compile, maybe 2s)
Then I added an import:
If I add a different import instead (
github.com/imjasonh/csvstruct
), it compiles and tells me the import was unused, much more quickly:What did you expect to see?
I expected to see a relatively prompt compilation error indicating the import was unused.
What did you see instead?
Indefinite hanging, giving up after 12 minutes.
Is there something unusual about the k8s import that causes this to blow up?
The text was updated successfully, but these errors were encountered: