You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 7, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on May 7, 2021. It is now read-only.
This seems like a reasonable feature. Is there anything go-plus is doing that is specifically causing issues, or should we be detecting GVM use somehow and then invoking it to determine go / GOPATH paths?
Using Atom 1.1 when I have instance already running with another project launching
gvm use go1.5
# Now using version go1.5export GOPATH="$(pwd):$GOPATH"
atom .
Seems like environment variables are not passed. When working with single project commands above are enough to get gvm working with go-plus.
Also I usually do first run without adding GOPATH to install tools globally. Would be handy to have list of commands for manual install as an alternative to automatic install.
When Atom is already running, any subsequent attempts to launch atom result in a new window being launched from the original process. So you're right, the environment for Windows 2...n will be ignored in favor of the environment for Window 1. There may be a workaround to this, but I'm not aware of it if there is.
Looking at goexecutable.coffee, it seems like go-plus doesn't inspect GOROOT (as per the Go install documentation) to find the Go installation.? If it did so, I'm assuming gvm would "just work".
➜ ~ echo "$PATH"
/home/mishak/.gvm/bin:/home/mishak/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
➜ ~ gvm use go1.5
Now using version go1.5
➜ ~ echo "$PATH"
/home/mishak/.gvm/pkgsets/go1.5/global/bin:/home/mishak/.gvm/gos/go1.5/bin:/home/mishak/.gvm/pkgsets/go1.5/global/overlay/bin:/home/mishak/.gvm/bin:/home/mishak/.gvm/bin:/home/mishak/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
I don't think that's relevant. GVM also updates GOROOT, and it is the "standard" way to locate the Go binaries, so supporting it would make all tools (including GVM) work.
GOROOT is required to be set when you put a runtime built for a standard location in a non-standard location. If you set the appropriate environment variables when building from source to your desired target location, GOROOT does not need to be set.
Regardless, go-plus doesn't care. You should ensure you launch atom from the terminal - in which your environment is set as you need - and things should just work. I agree I could add inspection of GOROOT to the detection logic, but in general the PATH should be used to specify the path to your desired runtime (and precedence among multiple installed runtimes).
You should remove the various paths from your configuration, check the option for environment overrides configuration, and make sure you launch atom from terminal or iterm2 instead of Dock/Finder/Spotlight/open.
+1 on this. I am able to set my GOPATH manually in the settings, but I keep getting the following warning: Warning: File [/home/chris/Documents/projects/personal/go/printf.go] does not reside within a "src" directory in your GOPATH [/home/chris/.gvm/pkgsets/go1.6rc1/global] - please review http://golang.org/doc/code.html#Workspaces
Activity
joefitzgerald commentedon Oct 14, 2014
This seems like a reasonable feature. Is there anything go-plus is doing that is specifically causing issues, or should we be detecting GVM use somehow and then invoking it to determine go / GOPATH paths?
mishak87 commentedon Oct 14, 2014
👍
dougnukem commentedon Oct 31, 2014
I had to specify my go executable as my "Go Installation" for it to work, otherwise it was reporting no go installation.
I tried setting my Go installation to
$HOME/.gvm/gos/go1.3.1/, but I still got "No Go Installation Found"mishak87 commentedon Nov 19, 2015
Using Atom 1.1 when I have instance already running with another project launching
Seems like environment variables are not passed. When working with single project commands above are enough to get gvm working with go-plus.
Also I usually do first run without adding GOPATH to install tools globally. Would be handy to have list of commands for manual install as an alternative to automatic install.
joefitzgerald commentedon Nov 19, 2015
When Atom is already running, any subsequent attempts to launch atom result in a new window being launched from the original process. So you're right, the environment for Windows 2...n will be ignored in favor of the environment for Window 1. There may be a workaround to this, but I'm not aware of it if there is.
alecthomas commentedon Dec 2, 2015
Looking at goexecutable.coffee, it seems like go-plus doesn't inspect
GOROOT(as per the Go install documentation) to find the Go installation.? If it did so, I'm assuming gvm would "just work".mishak87 commentedon Dec 2, 2015
GVM adds go binaries to
PATHno need forGOROOT.alecthomas commentedon Dec 2, 2015
I don't think that's relevant. GVM also updates GOROOT, and it is the "standard" way to locate the Go binaries, so supporting it would make all tools (including GVM) work.
joefitzgerald commentedon Dec 2, 2015
GOROOT is required to be set when you put a runtime built for a standard location in a non-standard location. If you set the appropriate environment variables when building from source to your desired target location, GOROOT does not need to be set.
Regardless, go-plus doesn't care. You should ensure you launch atom from the terminal - in which your environment is set as you need - and things should just work. I agree I could add inspection of GOROOT to the detection logic, but in general the PATH should be used to specify the path to your desired runtime (and precedence among multiple installed runtimes).
You should remove the various paths from your configuration, check the option for environment overrides configuration, and make sure you launch atom from terminal or iterm2 instead of Dock/Finder/Spotlight/open.
Prefer go From GOROOT/bin If It Exists
watzon commentedon Jan 29, 2016
+1 on this. I am able to set my GOPATH manually in the settings, but I keep getting the following warning:
Warning: File [/home/chris/Documents/projects/personal/go/printf.go] does not reside within a "src" directory in your GOPATH [/home/chris/.gvm/pkgsets/go1.6rc1/global] - please review http://golang.org/doc/code.html#Workspacesmbbroberg commentedon Jan 30, 2016
I had trouble at first and then relaunched from terminal with no problem. Using gvm w/go1.5.3. Thanks @joefitzgerald!
mishak87 commentedon Jan 30, 2016
@iDev0urer workspaces are experimental feature in Go 1.5 in 1.6 they will be enabled.
Some tool you are using is setting
export GO15VENDOREXPERIMENT=1.https://tip.golang.org/doc/go1.6#go_command
Always work on one Go project in Atom and always launch atom from that projects directory to avoid issues.
zmb3 commentedon Oct 7, 2018
Closing this due to age.