luan / vimfiles

The Vim Configuration. Uses vim-plug to manage plugins.
172 stars 58 forks source link

vim-update or install fails: missing gometalinter #143

Closed MissingRoberto closed 4 years ago

MissingRoberto commented 4 years ago

Tried to install vimfiles in a new laptop failed because of missing gometalinter in ~/.vim/gobin.

DONE vim plugins
INSTALL go binaries (may take a while)...

/Users/r.jimenez/.vim/bin/install: line 262: /Users/r.jimenez/.vim/gobin/gometalinter: No such file or directory

As a side comment, if you visit https://github.com/alecthomas/gometalinter, you see that the linter have been deprecated in favour of golangci.

Even installing the linter manually, you run into the following issue:

WARNING: Linters are now vendored by default, --update ignored. The original
behaviour can be re-enabled with --no-vendored-linters.

To request an update for a vendored linter file an issue at:
https://github.com/alecthomas/gometalinter/issues/new

gometalinter: error: could not find vendored linters in GOPATH="XXX"
nwmahoney commented 4 years ago

Simply commenting out the offending line worked for me:

setup_go_dependencies() {
  (
  cd "${VIMFILES_PATH}" || exit 2
  mkdir -p gobin gopath
  echo -e "${YELLOW}INSTALL${END_COLOR} ${BOLD}go binaries${NORMAL} (may take a while)..." >&4
  GOPATH="${PWD}/gopath" ${VIMCMD} +'GoUpdateBinaries' +'qall!'
  echo
  # gometalinter has been deprecated in favor of golangci-lint
  # GOPATH="${PWD}/gopath" GOBIN="${PWD}/gobin" "${PWD}/gobin/gometalinter" --install --update
  echo -e "${GREEN}DONE${END_COLOR} ${BOLD}go binaries${NORMAL}" >&4
  set +e
  GOPATH="${PWD}/gopath" GOBIN="${PWD}/gobin" "${PWD}/gobin/gocode" close 2>/dev/null
  set -e
  )
}
MissingRoberto commented 4 years ago

@nwmahoney 🤔do you still have linting after that? I had to add some more changes because there are references to gometalinter in multiple places.

nwmahoney commented 4 years ago

I haven’t tried yet. I thought I mentioned this in my last comment but I guess not... oops. Anyway, what I meant to say is that simply commenting it out unblocked my install/update script.

I am planning on working with go soon though... did replacing other references to gometalinter with golangci-lint get go linting working for you?

MissingRoberto commented 4 years ago

Created a PR with my local fixes: https://github.com/luan/vimfiles/pull/146

luan commented 4 years ago

Can we close this now that #146 has been merged?

MissingRoberto commented 4 years ago

yes, I think so.

@nwmahoney feel free to disagree if you encounter the problem again