Skip to content
This repository was archived by the owner on May 7, 2021. It is now read-only.
This repository was archived by the owner on May 7, 2021. It is now read-only.

GVM support? #74

Closed
Closed

Description

@runcom

It would be nice to have https://github.com/moovweb/gvm support. GVM set the gopath to something like /home/antonio/.gvm/pkgsets/go1.3.3/global so you could derive the current go installation and tools

Activity

  1. joefitzgerald commented on Oct 14, 2014

    @joefitzgerald
    Owner

    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?

  2. mishak87 commented on Oct 14, 2014

    @mishak87

    👍

  3. dougnukem commented on Oct 31, 2014

    @dougnukem

    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"

  4. mishak87 commented on Nov 19, 2015

    @mishak87

    Using Atom 1.1 when I have instance already running with another project launching

    gvm use go1.5
    # Now using version go1.5
    export 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.

  5. joefitzgerald commented on Nov 19, 2015

    @joefitzgerald
    Owner

    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.

  6. alecthomas commented on Dec 2, 2015

    @alecthomas

    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".

  7. mishak87 commented on Dec 2, 2015

    @mishak87

    GVM adds go binaries to PATH no need for GOROOT.

    ➜  ~  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
    
  8. alecthomas commented on Dec 2, 2015

    @alecthomas

    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.

  9. joefitzgerald commented on Dec 2, 2015

    @joefitzgerald
    Owner

    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.

  10. watzon commented on Jan 29, 2016

    @watzon

    +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

  11. mbbroberg commented on Jan 30, 2016

    @mbbroberg

    I had trouble at first and then relaunched from terminal with no problem. Using gvm w/go1.5.3. Thanks @joefitzgerald!

  12. mishak87 commented on Jan 30, 2016

    @mishak87

    @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.

  13. zmb3 commented on Oct 7, 2018

    @zmb3
    Collaborator

    Closing this due to age.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions