Liteide: Jump to declaration not working in Go modules

Created on 9 Sep 2018  路  5Comments  路  Source: visualfc/liteide

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.

enhancement

Most helpful comment

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

All 5 comments

please download liteide x34.2 and check

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

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

seems fixed to me. Thanks

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?

Was this page helpful?
0 / 5 - 0 ratings