[Feedback request] How to best handle custom language packages


One of the most requested features for the golang plugin[1] is improved support for GOPATH[2].
Currently the plugin tries its best to detect it from environment variables and use it accordingly but when comparing the smoothness of how other languages work with IDEA and how golang works we are miles away.
Go projects are usually organized into a workspaces[3] like that. In order to properly respect the GOPATH indications, one would need to have the following environment variable set like this: GOPATH=/home/florin/go
But, as asked in a previous thread[4], for some reason IDEA doesn't seem to like that kind of setup and I had to create an workaround[5]. Also, many times it's hard to detect the environment variable correctly or people expect something else from the IDE.

As such, I want to improve the situation but since my resources to investigate this are limited and I would like to have some feedback on what I'll attempt to do to improve this.

There should be a GOPATH setting for global IDEA, that could be overwritten for every project.
Then, there should be an option to do something like: 'refresh cache' which should add / remove the existing go libraries, based on their presence.
For each 'top level' package in GOPATH, say for example github.com/dlsniper/gopack, there should be a 'Library', called gopack in the example.

But, with this approach, there are a couple of things that are not clear to me:

  • is this a good idea? :D
  • can libraries be edited by idea if the library root is a project root as well, or I'll run into the issues like in the past[4]?
  • can non-IDEA IDEs (PHPStorm, et all) support libraries?
  • will IDEA play nice with maybe a hundred or more extra libraries added?
  • will the auto-completion code need to be changed to handle the libraries in a different way?

Or if there's a better way to integrate the concept of GOPATH inside IDEA I would very much like to do it so that it behaves like what people come to expect in terms of quality for the platform.
Just to be clear, I'll implement all the changes needed (and most likely open up more questions here), I don't request for someone to help us with commits (though that would be nice :D)

Closing argument: We've had about 10.000 downloads since we pushed out the new version at the begining of January, gained a new core contributor, received open source licenses for a well known profiler, there are at least 150+ people requesting official support for golang[6] but I think we could be close enough with the quality given enough time.

Thank you very much for your time and help.

Kind regards,

[1] https://github.com/go-lang-plugin-org/go-lang-idea-plugin
[2] https://code.google.com/p/go-wiki/wiki/GOPATH
[3] http://golang.org/doc/code.html#Workspaces
[4] http://devnet.jetbrains.com/message/5506414#5506414
[5] https://github.com/dlsniper/google-go-lang-idea-plugin/commit/d203a71b39ddc8acf8e03a39955aa8e0ca82a625
[6] http://youtrack.jetbrains.com/issue/IDEABKL-5938

1 comment
Comment actions Permalink

Bump. Anyone please? (we have 11.000 downloads now, since the initial post with 10.000 btw). Thank you.


Please sign in to leave a comment.