-
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/tools/gopls: crash in completion.Selection.Suffix #68169
Labels
Milestone
Comments
findleyr
changed the title
gopls: automated issue report (crash)
x/tools/gopls: crash in completion.Selection.Suffix
Jun 25, 2024
gopherbot
added
Tools
This label describes issues relating to any tools in the x/tools repository.
gopls
Issues related to the Go language server, gopls.
labels
Jun 25, 2024
Change https://go.dev/cl/594796 mentions this issue: |
Thanks for the detailed reproducer -- it made it much easier to test and fix this crash. Fixed in the CL above. |
Change https://go.dev/cl/595575 mentions this issue: |
gopherbot
pushed a commit
to golang/tools
that referenced
this issue
Jun 27, 2024
…kage clause completion suffix CL 585275 introduced a call to completion.Surrounding.Suffix that exposed a latent bug in package clause completions: the completion content was not being correctly computed as containing the cursor. Fix the heuristics for completing at "package<whitespace>|", so that the surrounding content is correct. As a result of this change the 'editRegexp' from some completion tests now no longer includes the newline, which also seems more correct. Fixes golang/go#68169 Change-Id: I32ea20a7f9f0096aef85ed77c64d3b4dfeedef45 Reviewed-on: https://go-review.googlesource.com/c/tools/+/594796 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]> Auto-Submit: Robert Findley <[email protected]> (cherry picked from commit 008ed2c) Reviewed-on: https://go-review.googlesource.com/c/tools/+/595575
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this issue
Jul 7, 2024
This release addresses the following gopls issues: golang/go#68116, broken links to dependencies in the new integrated doc viewer. golang/go#68169, a crash in package name completion. golang/go#68213, a crash when hovering over an interface with an empty type set. golang/go#68240, additional telemetry instrumentation to help inform decisions for [email protected]. (Note that this is local instrumentation only; a separate proposal will be filed to allow collection of this data from users who have opted in to sharing their telemetry data).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
gopls version: v0.16.0/go1.22.3
gopls flags:
update flags: proxy
extension version: 0.41.4
environment: Visual Studio Code linux
initialization error: undefined
issue timestamp: Tue, 25 Jun 2024 03:14:01 GMT
restart history:
Mon, 24 Jun 2024 16:34:36 GMT: activation (enabled: true)
Mon, 24 Jun 2024 16:44:55 GMT: installation (enabled: true)
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.
Describe what you observed:
When I create a package named
play
, then rename the folder toplaydos
, and modify theplay
package declaration to an empty package declaration,gopls
crashes upon pressingCtrl+Space
.Steps to reproduce:
play
:playdos
:play.go
:Ctrl+Space
andgopls
crashes.gopls stats -anon
{ "DirStats": { "Files": 408, "TestdataFiles": 0, "GoFiles": 4, "ModFiles": 0, "Dirs": 237 }, "GOARCH": "amd64", "GOOS": "linux", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.22.3", "GoplsVersion": "v0.16.0", "InitialWorkspaceLoadDuration": "297.60698ms", "MemStats": { "HeapAlloc": 21433088, "HeapInUse": 36306944, "TotalAlloc": 334530672 }, "WorkspaceStats": { "Files": { "Total": 1384, "Largest": 395026, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.4", "AllPackages": { "Packages": 218, "LargestPackage": 161, "CompiledGoFiles": 1380, "Modules": 20 }, "WorkspacePackages": { "Packages": 13, "LargestPackage": 10, "CompiledGoFiles": 35, "Modules": 1 }, "Diagnostics": 8 } ] } }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.
Logs have been attached as a file: logs.txt
The text was updated successfully, but these errors were encountered: