stamblerre / gocode

An autocompletion daemon for the Go programming language
MIT License
394 stars 28 forks source link

build failed #4

Closed logeable closed 6 years ago

logeable commented 6 years ago

build failed

src/github.com/stamblerre/gocode/internal/suggest/suggest.go:138:3: cannot use func literal (type func(token.FileSet, string) (ast.File, error)) as type func(token.FileSet, string, []byte) (ast.File, error) in field value

packages.Config.ParseFile

alexkreidler commented 6 years ago

Same issue:

$ go get github.com/stamblerre/gocode
# github.com/stamblerre/gocode/internal/suggest
go/src/github.com/stamblerre/gocode/internal/suggest/suggest.go:138:3: cannot use func literal (type func(*token.FileSet, string) (*ast.File, error)) as type func(*token.FileSet, string, []byte) (*ast.File, error) in field value

Thanks for helping with a fork

alexkreidler commented 6 years ago

It looks like the error is coming from a breaking change in golang/tools 5 days ago. Here is the commit: https://github.com/golang/tools/commit/2f1727f1b37d7d257665debc72d4ae0b8e449748#diff-04792145c70ebd708928684da4875fe9R108

win-t commented 6 years ago

haha, it's funny when the golang team forces everyone to follow import compatibility rule, but then, they are the one who broke this rule.

tonka3000 commented 6 years ago

So we have to wait to get it fixed?

tyhi commented 6 years ago

@stamblerre fixed it with 00b5ffcd8b84cfd1ecb922016a778abfa3d414bc. Builds for me now.

stamblerre commented 6 years ago

Sorry about not fixing this earlier--somehow didn't get a notification for this. Should be fixed now.