One of the most requested features for the golang plugin is improved support for GOPATH.
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 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, for some reason IDEA doesn't seem to like that kind of setup and I had to create an workaround. 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?
- 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 but I think we could be close enough with the quality given enough time.
Thank you very much for your time and help.