x/tools error while trying to install

98 views
Skip to first unread message

Eric Garcia

unread,
May 7, 2021, 2:11:58 PM5/7/21
to golang-nuts
Was trying to install all the tools, and hit the following errors.

go version 1.16.3

```
../../golang.org/x/tools/gopls/internal/hooks/analysis.go:31:5: cannot use simple.Analyzers (type map[string]*lint.Analyzer) as type map[string]*analysis.Analyzer in argument to add
../../golang.org/x/tools/gopls/internal/hooks/analysis.go:32:5: cannot use staticcheck.Analyzers (type map[string]*lint.Analyzer) as type map[string]*analysis.Analyzer in argument to add
../../golang.org/x/tools/gopls/internal/hooks/analysis.go:39:5: cannot use stylecheck.Analyzers (type map[string]*lint.Analyzer) as type map[string]*analysis.Analyzer in argument to add
```

Has anyone else hit this, or found a way around it. It seems to have been introduced with this commit: https://github.com/golang/tools/commit/799b6824f9e71770e719f77130115e8490b6427e 


wagner riffel

unread,
May 7, 2021, 3:43:25 PM5/7/21
to Eric Garcia, golang-nuts
On Fri May 7, 2021 at 11:10 AM -03, Eric Garcia wrote:
> Was trying to install all the tools, and hit the following errors.
>
> go version 1.16.3
>
> ```
> go get -u golang.org/x/tools/...
>

I think with go1.16 and later the correct way of installing programs
is with go install, it builds clean for me.
$ go install golang.org/x/tools/cmd/...@latest

-wagner
Reply all
Reply to author
Forward
0 new messages