go/gopls/internal/regtest/codelens
Robert Findley d025cced83 internal/lsp/source: don't crash requesting gc_details for an empty file
Requesting gc_details for an empty file never worked, but in the past it
would inadvertently get handled by our forgiving position helpers. With
https://go.dev/cl/409935, it became a crasher.

Fix the crash by adding handling when the package name position is
invalid.

Also move gc_details related codelens to their own file.

Fixes golang/go#54199

Change-Id: I7339b3903abd1315f1fea3dd9929d81855a8264a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/420715
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-02 18:19:01 +00:00
..
codelens_test.go internal/lsp/source: don't crash requesting gc_details for an empty file 2022-08-02 18:19:01 +00:00
gcdetails_test.go internal/lsp/source: don't crash requesting gc_details for an empty file 2022-08-02 18:19:01 +00:00