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

Jump to declaration not working in Go modules #977

Closed
silviucm opened this issue Sep 9, 2018 · 5 comments
Closed

Jump to declaration not working in Go modules #977

silviucm opened this issue Sep 9, 2018 · 5 comments

Comments

@silviucm
Copy link

silviucm commented Sep 9, 2018

Please answer these questions before submitting your issue. Thanks!
Please download LiteIDE latest version and test before submitting your issue. Thanks!

What version of LiteIDE are you using (LiteIDE About - Version and Build Qt Version)?

X34.1 (Qt 5.5.1)

What version of Go are you using (go version)?

go version go1.11 linux/amd64

What operating system and processor architecture are you using(go env)?

linux / amd64

What did you do?

Created a module-based project with several subpackages. For example package A with sub-package A1, and package B. A1 uses B.methodB()

If possible, provide a recipe for reproducing the error.
Right-click on "B.methodB()" and chose "Jump to declaration"

What did you expect to see?

Editor goes to package B, to the file containing func methodB()

What did you see instead?

Nothing happens. Problem just with packages inside module. Packages inside the /pkg/mod cache work.

@visualfc
Copy link
Owner

visualfc commented Sep 15, 2018

please download liteide x34.2 and check

@silviucm
Copy link
Author

Unfortunately, this one still not working

Example project:
/home/myuser/projects/modtest/ ==> go.mod
https://gist.github.com/silviucm/0c90ae3590b70005df3f91a97df6e4b5

/home/myuser/projects/modtest/cli/servio ==> main.go, reference-import "modtest/servio".
https://gist.github.com/silviucm/1de0f96f9b80c5180c9ff54a2f80fb3c

/home/myuser/projects/modtest/servio ==> servio.go function ServerFunc(etc,etc)
https://gist.github.com/silviucm/c162ee86f2d0d9837fe8b5c5d7042f29

Inside cli/server => main.go, main function, I import "modtest/servio" then write a call to
servio.ServerFunc(...)
a) Compilation works and executable created
b) The "Jump to declaration" (CTRL+Shift+J) is not working unfortunately

@visualfc
Copy link
Owner

fixed. please update tools and check.

go get -u github.com/visualfc/gotools
go get -u github.com/visualfc/gocode

Windows/Linux: copy GOPATH/bin gotools and gocode to liteide/bin
MacOS: copy GOPATH/bin gotools and gocode to LiteIDE.app/Contents/MacOS

@silviucm
Copy link
Author

seems fixed to me. Thanks

@elegos
Copy link

elegos commented Dec 20, 2018

Hello @visualfc

Installing liteide in /usr/local/bin makes things harder to have those deps inside of it. Would it be possible to make an option to specify GOPATH and thus use that path for those two binaries, if existing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants