x/tools/gopls: error reporting type as chan<- invalid type
#67637
Labels
Milestone
chan<- invalid type
#67637
gopls version
Build info ---------- golang.org/x/tools/gopls v0.15.3 golang.org/x/tools/gopls@v0.15.3 h1:zbdOidFrPTc8Bx0YrN5QKgJ0zCjyGi0L27sKQ/bDG5o= github.com/BurntSushi/toml@v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/google/go-cmp@v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= golang.org/x/exp/typeparams@v0.0.0-20221212164502-fae10dda9338 h1:2O2DON6y3XMJiQRAS1UWU+54aec2uopH3x7MAiqGW6Y= golang.org/x/mod@v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= golang.org/x/sync@v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/telemetry@v0.0.0-20240209200032-7b892fcb8a78 h1:vcVnuftN4J4UKLRcgetjzfU9FjjgXUUYUc3JhFplgV4= golang.org/x/text@v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/tools@v0.18.1-0.20240412183611-d92ae0781217 h1:uH9jJYgeLCvblH0S+03kFO0qUDxRkbLRLFiKVVDl7ak= golang.org/x/vuln@v1.0.1 h1:KUas02EjQK5LTuIx1OylBQdKKZ9jeugs+HiqO5HormU= honnef.co/go/tools@v0.4.6 h1:oFEHCKeID7to/3autwsWfnuv69j3NsfcXbvJKuIcep8= mvdan.cc/gofumpt@v0.6.0 h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo= mvdan.cc/xurls/v2@v2.5.0 h1:lyBNOm8Wo71UknhUs4QTFUNNMyxy2JEIaKKo0RWOh+8= go: go1.23-20240419-RC02 cl/626470163 +7f76c00fc5 X:fieldtrack,boringcrypto
go env
What did you do?
Added this test in std [1] to
os/exec_test.go
:[1] My Go tree is checked out at 3ea2be1. The
go
binary in gopls' PATH is the toolchain built from the same checkout.What did you see happen?
My editor (nvim, using the built-in LSP client) reported an error on the
signal.Notify
line:cannot use c (variable of type chan os.Signal) as chan<- invalid type value in argument to signal.Notify
, despite the fact that this test compiles successfully.(I may have had a type error on this line when I was originally writing it, I can't quite recall)
What did you expect to see?
No error
Editor and settings
nvim 0.10 using the built in LSP client. gopls is configured using https://github.com/neovim/nvim-lspconfig
require("lspconfig").gopls.setup{}
(no special gopls settings).I work in the Go tree, but typically don't have my dev Go toolchain in PATH for stability reasons. I invoke my editor with
PATH=/path/to/dev/go:$PATH nvim os/exec_test.go
so gopls will pick up the dev toolchain. GOROOT is not explicitly set in the environment. This setup seems to be generally working correctly, xrefs in std and cmd work.Logs
Here are the logs from earlier. I will see if I can reproduce with a higher log level.
The
gopkgsdriver
errors should be unrelated from a completely different instance of my editor outside of my Go checkout. But perhaps there is some confusion going on here?The text was updated successfully, but these errors were encountered: