-
Notifications
You must be signed in to change notification settings - Fork 646
use last gopath element when installing tools #1988
use last gopath element when installing tools #1988
Conversation
Why use last? The |
I thought so too, but that is not what I observed. Can you double check that you observe it installing to first? |
Yes, that is how I observe it to work on Linux and Windows. This is even documented behavior. https://golang.org/cmd/go/#hdr-Download_and_install_packages_and_dependencies
|
That is pretty definite documentation. I wonder why I think I observed what I observed. I'll change this. I also had a question re: calling |
I find that weird too. |
I realize now that the same code paths in vscode-go are made to install the tools even when there is no GOPATH, e.g. the GOPATH is infered per project or the go project uses go modules. I'm going to change the index to 0 and hopefully that is acceptable. |
b3993ff
to
e16e0aa
Compare
To support Go modules, we use forks of In order to do this, we use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @jrwren
Multiple gopath was not an issue previously when installing tools, as we didnt use it directly for anything. It was only set as an environment variable.
Now that we use it directly to build the forks of gocode
and godef
, this fix is necessary
#1966