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/tools/gopls: can't determine type sizes for compiler #63751
Comments
hit the same this morning, had to downgrade suspecting https://go-review.googlesource.com/c/tools/+/537118 👀 // If type size information is needed but unavailable.
// reject the whole Load since the error is the same for every package.
ld.sizes = types.SizesFor(response.Compiler, response.Arch)
if ld.sizes == nil && ld.Config.Mode&(NeedTypes|NeedTypesSizes|NeedTypesInfo) != 0 {
return nil, fmt.Errorf("can't determine type sizes for compiler %q on GOARCH %q",
response.Compiler, response.Arch)
} |
Hi, thanks very much for the report, and you are correct that this is related to https://go-review.googlesource.com/c/tools/+/537118. However, that CL was meant to turn a panic into an error -- if downgrading fixed the problem, there's still something we don't understand. Can you please share the version of Go used to compile gopls (which can be obtained via CC @adonovan |
More questions: Can you please report the output of the following query, run from your workspace directory?
Does restarting gopls@v0.14.0 fix the problem? Can you try this a few times? |
One more: do you by any chance have |
Version used to compile gopls: go version:
No amount of restarting seems to be doing the trick Yes, my Note: I'm using Bazel and VSCode, all the go commands I ran from |
Awesome, thank you for following up. In that case, I think we understand this and will cut a patched prerelease soon. In short: the It looks like the bazel driver was updated to set the missing fields in bazelbuild/rules_go@6e10f8c, so you may also be able to fix this by updating bazel. For other folks paying attention to this issue: can anyone else please confirm that they have a |
This should be fixed in v0.14.1-pre.1:
Could anyone here please try that out to confirm? With your confirmation, we will release v0.14.1 tomorrow. |
Since it's Friday and I have yet to hear confirmation of the fix, let's defer the release until Monday. |
This worked for me, thank you! |
@Urvik08 thanks for confirming! |
@findleyr Thank you for the fix! Have a great weekend. |
This works for me too. I'm also using Bazel and |
This works for me too. I'm also using Bazel. Thanks for the quick fix! |
Thanks all. This is released as gopls@v0.14.1:
|
go 1.21
gopls v0.14.0
vscode: 1.83.1
vscode note:
Error loading workspace: packages. Load error: can't determine type sizes for compiler "" on GOARCH ""
The text was updated successfully, but these errors were encountered: