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: gopls crash due to monoGraph assertion failure (generics) #53794
Comments
Hi, thanks for the report! Do you recall what you were typing / working on when you encountered this panic? |
@findleyr I remember just ctrl+s, then it panic! |
@474420502 is this reproducible? This crash is in the type checker, so any details you could share about the generic code you were editing would be very helpful. |
@474420502 any additional information you could share would be incredibly helpful. A crash in the type-checker may be a big deal, and potentially something that we would try to fix for the 1.19 release. I briefly investigated this crashing stack, and don't yet see how this assertion failure is possible: the assertion suggests that a generic function is somehow instantiated with a type parameter from another package, but I observe:
With these constraints, I don't see how we could pass a type parameter from another package as a type argument. My best guess is that there may be a bug in type inference allowing a type parameter from the function declaration to be inferred as a type argument. |
@findleyr i can't reproducible this. It probably came up when I converted the tree structure to a generic type. |
Tentatively marking this for 1.20. We should get to the bottom of this crash, but since it is a crash (and not a miscompilation), and this code has not changed recently, I think it is probably OK to address in 1.20. |
@mdempsky do you have any bandwidth to look at this (or any ideas of how to start)? If not, I think it is safe to bump to 1.21. I haven't really investigated. |
@findleyr Is there a repro case? I didn't see any. If not and the reporter can't reproduce anymore either, I think it's fine to just close this and wait for someone else to hit the same issue and give us steps to reproduce. |
Sounds good to me. Closing as not actionable. |
gopls version: v0.9.0 (go1.18.3)
gopls flags:
update flags: proxy
extension version: 0.34.1
go version: 1.18.3
environment: Visual Studio Code linux
initialization error: undefined
issue timestamp: Fri, 08 Jul 2022 20:17:06 GMT
restart history:
Fri, 08 Jul 2022 20:16:56 GMT: activation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.
NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.
<OPTIONAL: ATTACH LOGS HERE>
The text was updated successfully, but these errors were encountered: