Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

Does not work with deoplete-go #29

Closed
joshuarubin opened this issue May 7, 2018 · 12 comments
Closed

Does not work with deoplete-go #29

joshuarubin opened this issue May 7, 2018 · 12 comments

Comments

@joshuarubin
Copy link

I'm not quite sure what the issue is, but this version of gocode doesn't seem to work with deoplete-go. I've opened an issue there too. I'm happy to help debug, develop fixes, whatever, I'm just not sure where to start.

@Shougo
Copy link

Shougo commented Jun 2, 2018

I have tested it and works for me.

@mdempsky
Copy link
Owner

What doesn't work? What happens and what do you expect to happen instead? How do I reproduce this?

@Shougo
Copy link

Shougo commented Jul 11, 2018

I think the issue can be closed.

@wingyplus
Copy link

I think this issue can be solved with deoplete-go

@zachfi
Copy link

zachfi commented Sep 8, 2018

I believe this to be related to the changes in go1.11. After updating from 1.10.3 to 1.11 I had a bunch of issues, and now deoplete only works when I manually set the path to prefer a downloaded 1.10.3 and relaunch vim.

@zachfi
Copy link

zachfi commented Sep 8, 2018

Oh, I also reinstalled all the binaries after vim was relaunched.

@Shougo
Copy link

Shougo commented Sep 8, 2018

It seems gocode problem.
I think gocode does not support Go 1.11.

@myitcv
Copy link

myitcv commented Sep 8, 2018

I think gocode does not support Go 1.11.

Why do you think this?

In GOPATH mode gocode will continue to work just fine.

In modules mode we need to wait on #46

@Shougo
Copy link

Shougo commented Sep 8, 2018

After updating from 1.10.3 to 1.11 I had a bunch of issues, and now deoplete only works when I manually set the path to prefer a downloaded 1.10.3 and relaunch vim.

Because, the information.

Unfortunately, I cannot test Go 1.11. My Go version is 1.10.3 yet.
I will test Go 1.11 with gocode later.

@DisposaBoy
Copy link

I'm probably stating the obvious, but: Unless you're using gocode in source mode, you need to make sure your packages are installed. Since go1.10 introduced the package cache you need to manually install imported packages or use go install -i. Updating to go1.11 will require re-installation of said packages.

@myitcv
Copy link

myitcv commented Sep 9, 2018

This list of things to check are:

  • gocode has been recompiled with Go 1.11
  • All existing gocode instances have been closed
  • You either use source mode or install your package dependencies (excluding the standard library) with go install <pkglist> (each dependency must be listed)
  • You are working in GOPATH mode in Go 1.11

Here is confirmation that things are working with Go 1.11:

go version
export GOPATH=$(mktemp -d)
cd $GOPATH
export PATH=$GOPATH/bin:$PATH
go get github.com/mdempsky/gocode

gocode close

mkdir -p src/example.com/blah
cd src/example.com/blah
cat <<EOD > blah.go
package main

import "fmt"

func main() {
fmt.
}
EOD
gocode -in $GOPATH/src/example.com/blah/blah.go autocomplete $GOPATH/src/example.com/blah/blah.go 47

gives the following for me:

go version go1.11 linux/amd64
Found 25 candidates:
  func Errorf(format string, a ...interface{}) error
  func Fprint(w io.Writer, a ...interface{}) (n int, err error)
  func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error)
  func Fprintln(w io.Writer, a ...interface{}) (n int, err error)
  func Fscan(r io.Reader, a ...interface{}) (n int, err error)
  func Fscanf(r io.Reader, format string, a ...interface{}) (n int, err error)
  func Fscanln(r io.Reader, a ...interface{}) (n int, err error)
  func Print(a ...interface{}) (n int, err error)
  func Printf(format string, a ...interface{}) (n int, err error)
  func Println(a ...interface{}) (n int, err error)
  func Scan(a ...interface{}) (n int, err error)
  func Scanf(format string, a ...interface{}) (n int, err error)
  func Scanln(a ...interface{}) (n int, err error)
  func Sprint(a ...interface{}) string
  func Sprintf(format string, a ...interface{}) string
  func Sprintln(a ...interface{}) string
  func Sscan(str string, a ...interface{}) (n int, err error)
  func Sscanf(str string, format string, a ...interface{}) (n int, err error)
  func Sscanln(str string, a ...interface{}) (n int, err error)
  type Formatter interface
  type GoStringer interface
  type ScanState interface
  type Scanner interface
  type State interface
  type Stringer interface

@stamblerre
Copy link
Collaborator

gocode does work for Go 1.11. Closing this issue.

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

8 participants