Skip to content
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

Errors while installing v1.28 in NVIM v0.9.5 #3664

Closed
paskozdilar opened this issue Jun 3, 2024 · 4 comments
Closed

Errors while installing v1.28 in NVIM v0.9.5 #3664

paskozdilar opened this issue Jun 3, 2024 · 4 comments

Comments

@paskozdilar
Copy link
Contributor

paskozdilar commented Jun 3, 2024

What did you do? (required: The issue will be closed when not provided)

I executed :GoUpdateBinaries:

[...]
vim-go: Error installing golang.org/x/tools/cmd/guru@master: go: golang.org/x/tools/cmd/guru@master (in golang.org/x/tools/cmd/[email protected]):
vim-go:         The go.mod file for the module providing named packages contains one or
vim-go:         more replace directives. It must not contain directives that would cause
vim-go:         it to be interpreted differently than if it were the main module.
[...]
vim-go: Error installing honnef.co/go/tools/cmd/keyify@master: go: honnef.co/go/tools/cmd/keyify@master: module honnef.co/go/tools@master found (v0.5.0-0.de
v.0.20240601151239-d39a04f5c28a), but does not contain package honnef.co/go/tools/cmd/keyify
[...]

The problem can be reproduced by building a Docker image with the following Dockerfile:

FROM ubuntu:24.04
RUN apt-get -y update
RUN apt-get -y install git golang-go neovim
RUN git clone -b v1.28 https://github.com/fatih/vim-go.git ~/.local/share/nvim/site/pack/plugins/start/vim-go
RUN nvim --headless -c GoInstallBinaries

What did you expect to happen?

I expected :GoInstallBinaries to finish without errors.

What happened instead?

Instead, :GoInstallBinaries finished with errors.

Configuration (MUST fill this out):

vim-go version:

v1.28

Same thing happens with my local version (output of :PlugSnapshot):

silent! let g:plugs['vim-go'].commit = 'feef9b31507f8e942bcd21f9e1f22d587c83c72d'

vimrc you used to reproduce:

None.

Vim version (first three lines from :version):

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377

Same thing happens with my local version:

NVIM v0.10.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Go version (go version):

go version go1.22.2 linux/amd64

Same thing happens with my local version:

go version go1.22.3 linux/amd64

Go environment

go env Output:

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/root/.cache/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/root/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/root/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go-1.22'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/lib/go-1.22/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.2'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build606698463=/tmp/go-build -gno-record-gcc-switches'

gopls version

None.

@TOMOFUMI-KONDO
Copy link

I encounter same problem.

honnef.co/go/tools/cmd/keyif seems to have been removed on master branch. (It was under https://github.com/dominikh/go-tools/tree/master/cmd)

If fixed module version from master to v0.4.7, it worked.

$ git diff
diff --git a/plugin/go.vim b/plugin/go.vim
index b899243..576081a 100644
--- a/plugin/go.vim
+++ b/plugin/go.vim
@@ -54,7 +54,7 @@ let s:packages = {
       \ 'gorename':      ['golang.org/x/tools/cmd/gorename@master'],
       \ 'gotags':        ['github.com/jstemmer/gotags@master'],
       \ 'impl':          ['github.com/josharian/impl@main'],
-      \ 'keyify':        ['honnef.co/go/tools/cmd/keyify@master'],
+      \ 'keyify':        ['honnef.co/go/tools/cmd/[email protected]'],
       \ 'motion':        ['github.com/fatih/motion@latest'],
       \ 'iferr':         ['github.com/koron/iferr@master'],
 \ }

@paskozdilar
Copy link
Contributor Author

Indeed, it seems like both tools were removed on the master branch.


This is the commit message from keyify deletion:

commit 15f479d82fda0f1c73c3ffde924a734ca747cf88
Author: Dominik Honnef <[email protected]>
Date:   Tue May 21 14:38:26 2024 +0200

    cmd/keyify: delete

    Keyify has been unmaintained for years and hasn't been updated to work
    on Go modules. The same functionality exists in gopls.

    Closes: gh-185

This is the commit message from guru deletion:

commit 1f580da07881ed47f85cf39907a0b5c8e0d649b7
Author: Alan Donovan <[email protected]>
Date:   Fri Mar 8 14:33:08 2024 -0500

    cmd/guru: delete it

    RIP guru, Go's LSP server before LSP was invented.

    Fixes golang/go#65880

The proper fix would be to replace usage of both keyify and guru with gopls.

A workaround for both could be to pin the versions to the latest working versions, until the proper fixes are implemented.

@paskozdilar
Copy link
Contributor Author

Actually, guru support seems to have already been dropped in the master branch:

commit d0aed837b8fcb1bed03d9e4245ff6f02f925269c
Author: Billie Cleek <[email protected]>
Date:   Mon Mar 18 10:39:41 2024 -0700

    guru: drop guru support

    Guru has been removed from golang.org/x/tools/cmd/guru as described in
    https://docs.google.com/document/d/1_Y9xCEMj5S-7rv2ooHpZNH15JgRT5iM742gJkw5LtmQ/edit#heading=h.ojv16z1d1gas.

@bhcleek
Copy link
Collaborator

bhcleek commented Jun 6, 2024

Fixed in #3665

@bhcleek bhcleek closed this as completed Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants