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

Migrate to mdempsky/gocode ? #3281

Closed
6 of 12 tasks
scallister opened this issue Dec 27, 2018 · 2 comments
Closed
6 of 12 tasks

Migrate to mdempsky/gocode ? #3281

scallister opened this issue Dec 27, 2018 · 2 comments

Comments

@scallister
Copy link

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside
the brackets) before filing your issue:

  • I have read and understood YCM's CONTRIBUTING document.
  • I have read and understood YCM's CODE_OF_CONDUCT document.
  • I have read and understood YCM's README, especially the
    Frequently Asked Questions section.
  • I have searched YCM's issue tracker to find issues similar to the one I'm
    about to report and couldn't find an answer to my problem. (Example Google
    search.
    )
  • If filing a bug report, I have included the output of vim --version.
  • If filing a bug report, I have included the output of :YcmDebugInfo.
  • If filing a bug report, I have attached the contents of the logfiles using
    the :YcmToggleLogs command.
  • If filing a bug report, I have included which OS (including specific OS
    version) I am using.
  • If filing a bug report, I have included a minimal test case that reproduces
    my issue, including what I expected to happen and what actually happened.
  • If filing a installation failure report, I have included the entire output
    of install.py (or cmake/make/ninja) including its invocation
  • I understand this is an open-source project staffed by volunteers and
    that any help I receive is a selfless, heartfelt gift of their free time. I
    know I am not entitled to anything and will be polite and courteous.
  • I understand my issue may be closed if it becomes obvious I didn't
    actually perform all of these steps.

Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.

Issue Details

This isn't really a bug report so I left out the diagnostic info. This issue lies outside of YCM and in nsf/gocode. However I think a migration discussion may be warranted (I'm totally willing to put together a PR if people are in favor of it).

Autocompletion fails when using nsf/gocode on Go versions 1.10 and higher. This is called out on the nsf/gocode READ.md and that project recommends using this fork: https://github.com/mdempsky/gocode. If I install mdempsky/gocode instead of nsf/gocode the problem resolves itself. Given this is a fork and the original project recommends it, I think YCM may want to switch over to the fork.

Here is the snippet from nsf/gocode README.md recommending people use the fork:

IMPORTANT: consider switching to https://github.com/mdempsky/gocode if you have problems starting with Go version 1.10, due to changes in binary packages architecture (introduction of package cache) I'm not going to adjust gocode for it for quite some time. There is a higher chance that fork under the given link will have some solution to the problem sooner or later.

  • What did you do?

    • Installed Go using brew on MacOS (Go version 1.11.2)
    • Then I followed the YCM instructions for setup for Go (& Python).
    • Autocomplete worked on small files using the core Go library, but for larger files it fails entirely. The issue is documented well in this nsf/gocode project issue: Panics with unknown export format version -1 nsf/gocode#521
  • To fix
    Installing mdempsky/gocode into my $GOPATH and setting these vim options fixed the issue:

let g:ycm_gocode_binary_path = "$GOPATH/bin/gocode"
let g:ycm_godef_binary_path = "$GOPATH/bin/godef"

Diagnostic data

Given the fix it outside of YCM this seems n/a, so I'm leaving it out to not clutter the ticket. If it is valuable still, my apologies, I can add the diagnostic info back in.

@bstaletic
Copy link
Collaborator

We have already migrated to mdempsky/gocode. If you are having troubles with the provided gocode and godef you need to update YCM and its submodules.

@scallister
Copy link
Author

Thanks for the prompt response, sounds good, will do :).

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 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

2 participants