moovweb / gvm

Go Version Manager
http://github.com/moovweb/gvm
MIT License
10.18k stars 533 forks source link

Set -B to true by default #320

Open mcandre opened 5 years ago

mcandre commented 5 years ago

First time users will find that gvm is unable to install Go, e.g. gvm install go1.12, with a strange error about Go being missing. Well, the whole point of gvm is to help the user to obtain Go.

An internal detail of how gvm works, is of course that the bootstrapping process for obtaining Go is to compile the desired version of Go using a pre-existing Go compiler. That's not exactly intuitive. Fortunately, a -B flag for gvm install allows the user to select a pre-compiled edition of Go. I think we should enable this flag by default, so that new Go users get a better experience out of the box.

We can still disable the binary install option, but it would streamline the user experience to turn it on by default.

alexbevi commented 5 years ago

If setting -B by default isn't ideal, maybe just consider changing the error message to hint at using -B if you just want a binary and aren't trying to compile from source?

BenKnigge commented 4 years ago

This is something that I'm considering and plan on implementing unless I hear a good argument against it.

DHedgecock commented 3 years ago

@BenKnigge this would be great for hasty first time users like myself 😁

Related to getting setup, is installing Mercurial still required?

Thanks 🙌

rubensa commented 3 years ago

@BenKnigge Just tried and, at least for go1.16 version, Mercurial is no needed.

In a clean Ubuntu 20.04 installing go1.5 with gvm from source code (installing go1.4 binary version up-front, as stated in main page) does not work (with or without mercurial installed). I can find the following in the log:

# runtime/cgo
/usr/bin/ld: -r and -pie may not be used together

but go1.16 builds and installs without problem (without installing Mercurial).