You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
goplsIssues related to the Go language server, gopls.NeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.
as edge.Pos() accounts for edge.Site possibly being nil. Unfortunately I'm not able to come up with a simple reproducer. My code is along the lines of:
(note line 0 for the dynamic call, which is where the tool previously panicked)
Unless somebody more knowledgeable beats me to it, I'll create a pull request when I'm able to come up with a simple test to reproduce the panic.
What did you see happen?
Tool panicked with nil pointer dereference.
What did you expect to see?
Tool running successfully, reporting the callstack to the given function.
The text was updated successfully, but these errors were encountered:
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 10, 2024
goplsIssues related to the Go language server, gopls.NeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.
Go version
go version go1.22.4 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
Running
deadcode -whylive=somefunc .
on some code produced a a panic:The fix is trivial:
as
edge.Pos()
accounts foredge.Site
possibly beingnil
. Unfortunately I'm not able to come up with a simple reproducer. My code is along the lines of:but this one passes successfully (no panics), so there is something else I'm missing from my actual code:
With the above patch applied, the tool runs successfully and the output ends with:
(note line 0 for the dynamic call, which is where the tool previously panicked)
Unless somebody more knowledgeable beats me to it, I'll create a pull request when I'm able to come up with a simple test to reproduce the panic.
What did you see happen?
Tool panicked with
nil pointer dereference
.What did you expect to see?
Tool running successfully, reporting the callstack to the given function.
The text was updated successfully, but these errors were encountered: