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

Move to maintained version of Gocode #3138

Closed
flowchartsman opened this issue Sep 4, 2018 · 13 comments
Closed

Move to maintained version of Gocode #3138

flowchartsman opened this issue Sep 4, 2018 · 13 comments

Comments

@flowchartsman
Copy link

As mentioned in fatih/vim-go#1932, vim-go has moved to a new version of gocode because of 1.10 and 1.11 incompatibilities, and YCM should too.

@micbou
Copy link
Collaborator

micbou commented Sep 4, 2018

PR ycm-core/ycmd#1098 takes care of this.

@flowchartsman
Copy link
Author

I'll leave this up until the PR lands, then, to track and keep resubmissions down.

@flowchartsman
Copy link
Author

This has been merged into ycmd/master, closing PR

@flowchartsman
Copy link
Author

flowchartsman commented Sep 9, 2018

I was wrong. While this has landed in ycmd, YouCompleteMe is still broken.

@flowchartsman
Copy link
Author

@Valloric could you re-open?

@micbou
Copy link
Collaborator

micbou commented Sep 9, 2018

We need to update the ycmd submodule.

@micbou micbou reopened this Sep 9, 2018
@flowchartsman
Copy link
Author

Thanks, sorry for the churn.

@davidnewman
Copy link

What are the possible impacts of this before it is "fixed"?

I am running go 1.11, using MacVim as suggested, followed all the docs, etc and the auto-tiggers for go still don't seem to work.

A comment here mentions that that YouCompleteMe is "broken" due to this. <CTRL-Space> seems to work as does <C-x><C-o>. However, I should be able to type something like fmt. and start to see completions. That isn't happening.

@bstaletic
Copy link
Collaborator

Just go into YouCompleteMe/third_party/ycmd and pull the latest master if you need this fixed. With go 1.11 YCM is completely broken with an updated ycmd submodule. The <C-x><C-o> (or better said, omnifunc) is not something that YCM uses.

@davidnewman
Copy link

I'm certainly doing something wrong, or misunderstanding what's being said. Here's what I am doing:

  1. I use vundle, so I went and commented out the line adding the YouCompleteMe plugin from my .vimrc file. I then issues the :PluginClean command which deleted YCM from my system.
  2. I then uncommented the plugin line and issued :PluginInstall.
  3. I went to ~/.vim/bundle/YouCompleteMe/third_party/ycmd and did git checkout master && git pull
  4. I then went to ~/.vim/bundle/YouCompleteMe and issued ./install.py --go-completer and I get the following error:
can't load package: package github.com/mdempsky/gocode: no Go files in /Users/dnewman/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/go/src/github.com/mdempsky/gocode

Any idea as to what is up here?

@bstaletic
Copy link
Collaborator

Go back to YouCompleteMe/third_party/ycmd and do git submodule update --init --recursive. Then rebuild.

@davidnewman
Copy link

Thanks! This is working great now. Just to keep it easy, here are the steps.

Starting assumption:

  1. All you've done is install YouCompleteMe and followed the instructions for install.py --go-completer

Outcome:

  1. You do not see YouCompleteMe working for autocompletion of go files.

Fix:

  1. Change ycmd to be on master:
cd ~/.vim/bundle/YouCompleteMe/third_party/ycmd
git checkout master
git submodule update --init --recursive
  1. Repeat building the completers using the install.py script:
cd ~/.vim/bundle/YouCompleteMe
./install.py --clang-completer --go-completer

NOTE: Your invocation of ./install.py may differ if you are enabling other completers.

Outcome:

You should be able to open a Go file and see autocomplete working.

@bstaletic
Copy link
Collaborator

Another note: Vundle's :PluginUpdate, if I remember correctly, will try to run git submodule update --init --recursive in YouCompleteMe directory and, since ycmd is a YouCompleteMe submodule, it will be reverted to a broken commit.

zzbot added a commit that referenced this issue Oct 7, 2018
[READY] Update ycmd

Include the following changes:
 - PR ycm-core/ycmd#1075: remove Node.js workaround for Debian-based distributions;
 - PR ycm-core/ycmd#1077: update Boost to 1.68;
 - PR ycm-core/ycmd#1078: add semantic trigger for Julia;
 - PR ycm-core/ycmd#1081: improve type information on C++ member functions;
 - PR ycm-core/ycmd#1086: check if Python headers are installed before building;
 - PR ycm-core/ycmd#1088: raise proper exception for commands when file is still being parsed in C-family languages;
 - PR ycm-core/ycmd#1098: update Go completer;
 - PR ycm-core/ycmd#1099: update regex submodule;
 - PR ycm-core/ycmd#1100: add Python path to debugging information;
 - PR ycm-core/ycmd#1103: support framework headers completion and code navigation in C-family languages;
 - PR ycm-core/ycmd#1107: update Clang to 7.0.0;
 - PR ycm-core/ycmd#1109: update jdt.ls to 0.25.0;
 - PR ycm-core/ycmd#1110: handle null hover response from language servers;
 - PR ycm-core/ycmd#1111: update list of completion kinds defined by LSP;
 - PR ycm-core/ycmd#1113: send completion item kinds capability to language servers;
 - PR ycm-core/ycmd#1116: update Parso to 0.3.1 and Jedi to 0.13.1.

Closes #3138.
Closes #3145.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/3175)
<!-- Reviewable:end -->
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants