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

does not seem to be working properly with go 1.11 #48

Closed
phenixrizen opened this issue Aug 28, 2018 · 9 comments
Closed

does not seem to be working properly with go 1.11 #48

phenixrizen opened this issue Aug 28, 2018 · 9 comments

Comments

@phenixrizen
Copy link

No description provided.

@cneill
Copy link

cneill commented Aug 29, 2018

If you're like me and wondering how to get gocode working with YouCompleteMe/Vim, here's what I did: ycm-core/ycmd#1090 (comment)

@myitcv
Copy link

myitcv commented Aug 29, 2018

@phenixrizen is this in module-aware mode per chance?

@phenixrizen
Copy link
Author

@myitcv I'm not using module-aware mode

@myitcv
Copy link

myitcv commented Aug 29, 2018 via email

@phenixrizen
Copy link
Author

phenixrizen commented Aug 29, 2018

@myitcv I've built gocode with 1.11 and made sure I killed the daemon and removed the socket file. I've ran the daemon with the debug flag and I'm getting the following output when it's trying to do a dot lookup of methods:

2018/08/29 08:44:06 -------------------------------------------------------
2018/08/29 08:44:06 Error parsing input file (outer block):
2018/08/29 08:44:06 /home/pr/gosrc/src/github.com/phenixrizen/teststorage/main.go:26:5: expected selector or type assertion, found ';'
2018/08/29 08:44:06 /home/pr/gosrc/src/github.com/phenixrizen/teststorage/main.go:28:2: expected ';', found containers
2018/08/29 08:44:06 Elapsed duration: 1.314347ms
2018/08/29 08:44:06 Offset: 0
2018/08/29 08:44:06 Number of candidates found: 0
2018/08/29 08:44:06 Candidates are:
2018/08/29 08:44:06 =======================================================

@phenixrizen
Copy link
Author

@myitcv Also noticed that if I don't ad a . it thinks st is not a valid type, therefore it cannot find the methods:

2018/08/29 09:27:23 -------------------------------------------------------
2018/08/29 09:27:23 Elapsed duration: 1.205946ms
2018/08/29 09:27:23 Offset: 0
2018/08/29 09:27:23 Number of candidates found: 4
2018/08/29 09:27:23 Candidates are:
2018/08/29 09:27:23 package spew
2018/08/29 09:27:23 package storage
2018/08/29 09:27:23 type string string
2018/08/29 09:27:23 var st invalid type
2018/08/29 09:27:23 =======================================================

@myitcv
Copy link

myitcv commented Aug 29, 2018 via email

@phenixrizen
Copy link
Author

@myitcv You can clone this repo: https://github.com/phenixrizen/testjsondb.git

I dug into this and the package.Scope returned in the call on line 34 of internal/suggest.go returns the following Scope if I type "db" on line 16 of main.go in testjsondb:

(*types.Scope)(0xc0000c8870)(function scope 0xc0000c8870 {
. var db invalid type
. var err invalid type
})

@phenixrizen
Copy link
Author

This works properly with go1.11, I didn't notice the change to not look at source outside the stdlib.

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

3 participants