-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Some binaries require GOPATH mode to be installed #2248
Comments
This is the error I get about gometalinter
When I run :GoUpdateBinaries I get the aforementioned issue about gometalinter and the following issue about golangci-lint
|
Put vim-go in your runtimepath. |
Ah. Just make sure your working directory is in GOPATH when you run |
I am running this when in |
It's odd that your |
I believe I should be using module mode; I have been using it in one of my projects that is located outside of |
It's fine to use module mode in general, but not when installing gometalinter. |
I have been running in the terminal
Should I turn off module mode, install gometalinter, and then turn back on module mode? |
Yes |
That solved it 👍 Thank you so much! |
I'm reopening this, because vim-go can improve the user experience and eliminate the workaround of having to be in GOPATH to install some binaries. |
@drewthor can you clarify a couple of things that may help me fix this permanently in vim-go? You said:
and
I'm not sure how to reconcile those two statement given Also, what was |
I had a project not underneath my GOPATH; I had module mode GO111MODULE=on in order to work outside of the GOPATH and had been for at least a month (using vscode). When attempting to install vim-go via :GoInstallBinaries, I had opened vim (with no file opened) under my GOPATH. I had GO111MODULE=on when the installation was failing. Setting GO111MODULE=off allowed the install to succeed successfully. |
Set GO111MODULE=off when install tools, because some tools' (gometalinter and golangci-lint at this writing) won't install in module mode. Fixes fatih#2248
Set GO111MODULE=off when installing tools, because some tools' (gometalinter and golangci-lint at this writing) won't install in module mode. Add a new function, go#util#SetEnv to make it easy to set and restore environment variable correctly. Fixes fatih#2248
Set GO111MODULE=off when installing tools, because some tools' (gometalinter and golangci-lint at this writing) won't install in module mode. Add a new function, go#util#SetEnv, to make it easy to set and restore environment variables correctly. Fixes fatih#2248
Set GO111MODULE=off when installing tools, because some tools' (gometalinter and golangci-lint at this writing) won't install in module mode. Add a new function, go#util#SetEnv, to make it easy to set and restore environment variables correctly. Fixes fatih#2248
What did you do? (required. The issue will be closed when not provided.)
:GoInstallBinaries
What did you expect to happen?
Install vim-go properly
What happened instead?
vim-go is not installed
Configuration (MUST fill this out):
vim-go version:
I cannot get this as vim-go doesn't install. I am up-to-date (as of 27/04/2019) in cloned git repo of vim-go
vimrc
you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):set smartindent
set tabstop=2
set shiftwidth=4
set expandtab
set nocompatible
set shell=/bin/sh
syntax on
filetype plugin on
let g:go_disable_autoinstall = 0
" Use a blinking upright bar cursor in Insert mode, a blinking block in normal
if &term == 'xterm-256color' || &term == 'screen-256color'
let &t_SI = "<Esc>[5 q"
let &t_EI = "<Esc>[1 q"
endif
if exists('$TMUX')
let &t_EI = "<Esc>Ptmux;<Esc><Esc>]50;CursorShape=0\x7<Esc>\"
let &t_SI = "<Esc>Ptmux;<Esc><Esc>]50;CursorShape=1\x7<Esc>\"
endif
Vim version (first three lines from
:version
):VIM - Vi IMproved 8.1 (2018 May 18, compiled Feb 19 2019 12:07:03)
macOS version
Included patches: 1-950
Compiled by Homebrew
Go version (
go version
):go version go1.12 darwin/amd64
Go environment (
go env
):GOARCH="amd64"
GOBIN="/Users/Andrew/go/bin"
GOCACHE="/Users/Andrew/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/Andrew/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/opt/go/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/2h/fs20m5d15p59qn_30g437b000000gn/T/go-build304997520=/tmp/go-build -gno-record-gcc-switches -fno-common"
The text was updated successfully, but these errors were encountered: