A server-side entry in TopGit's GitHub warehouse: moovweb/gvm, 11.7k stars, Backend, Shell. Go Version Manager
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
By Josh Bussdieker (jbuss, jaja, jbussdieker) while working at Moovweb
Currently lovingly maintained by Benjamin Knigge
Pull requests and other any other contributions would be very much appreciated.
GVM provides an interface to manage Go versions.
Features
Install/Uninstall Go versions with gvm install [tag] where tag is "60.3", "go1", "weekly.2011-11-08", or "tip"
List added/removed files in GOROOT with gvm diff
Manage GOPATHs with gvm pkgset [create/use/delete] [name]. Use --local as name to manage repository under local path (/path/to/repo/.gvm_local).
List latest release tags with gvm listall. Use --all to list weekly as well.
Cache a clean copy of the latest Go source for multiple version installs.
Link project directories into GOPATH
Background
When we started developing in Go mismatched dependencies and API changes plagued our build process and made it extremely difficult to merge with other peoples changes.
After nuking my entire GOROOT several times and rebuilding I decided to come up with a tool to oversee the process. It eventually evolved into what gvm is today.
Once this is done Go will be in the path and ready to use. $GOROOT and $GOPATH are set automatically.
Additional options can be specified when installing Go:
Usage: gvm install [version] [options]
-s, --source=SOURCE Install Go from specified source.
-n, --name=NAME Override the default name for this version.
-pb, --with-protobuf Install Go protocol buffers.
-b, --with-build-tools Install package build tools.
-B, --binary Only install from binary.
--prefer-binary Attempt a binary install, falling back to source.
-h, --help Display this message.
A Note on Compiling Go 1.5+
Go 1.5+ removed the C compilers from the toolchain and replaced them with one written in Go. Obviously, this creates a bootstrapping problem if you don't already have a working Go install. In order to compile Go 1.5+, make sure Go 1.4 is installed first. If Go 1.4 won't install try a later version (e.g. go1.5), just make sure you have the -B option after the version number.
Binary versions for ARMv6 architecture are available starting from Go 1.6. So, it is necessary to bootstrap with an existing binary version, then it will be possible compiling other versions. For instance, to bootstrap a setup, version 1.21.0 may be used:
gvm install go1.21.0 -B
gvm use go1.21.0
And then, compile any other version:
gvm install go1.20.7
To install Go 1.20+
Go 1.20+ requires go1.17.3+. Use the below:
gvm install go1.4 -B
gvm use go1.4
export GOROOT_BOOTSTRAP=$GOROOT
gvm install go1.17.13
gvm use go1.17.13
export GOROOT_BOOTSTRAP=$GOROOT
gvm install go1.20
gvm use go1.20
List Go Versions
To list all installed Go versions (The current version is prefixed with "=>"):
gvm list
To list all Go versions available for download:
gvm listall
Uninstalling
To completely remove gvm and all installed Go versions and packages:
gvm implode
If that doesn't work see the troubleshooting steps at the bottom of this page.
Mac OS X Requirements
Install Mercurial from https://www.mercurial-scm.org/downloads
Install Xcode Command Line Tools from the App Store.
GVM supports vendoring package set-specific native code and related
dependencies, which is useful if you need to qualify a new configuration
or version of one of these dependencies against a last-known-good version
in an isolated manner. Such behavior is critical to maintaining good release
engineering and production environment hygiene.
As a convenience matter, GVM will furnish the following environment variables to
aid in this manner if you want to decouple your work from what the operating
system provides:
${GVM_OVERLAY_PREFIX} functions in a manner akin to a root directory
hierarchy suitable for auto{conf,make,tools} where it could be passed in
to ./configure --prefix=${GVM_OVERLAY_PREFIX} and not conflict with any
existing operating system artifacts and hermetically be used by your
workspace. This is suitable to use with C{PP,XX}FLAGS and LDFLAGS, but you will have
to manage these yourself, since each tool that uses them is different.
${PATH} includes ${GVM_OVERLAY_PREFIX}/bin so that any tools you
manually install will reside there, available for you.
${LD_LIBRARY_PATH} includes ${GVM_OVERLAY_PREFIX}/lib so that any
runtime library searching can be fulfilled there on FreeBSD and Linux.
${DYLD_LIBRARY_PATH} includes ${GVM_OVERLAY_PREFIX}/lib so that any
runtime library searching can be fulfilled there on Mac OS X.
${PKG_CONFIG_PATH} includes ${GVM_OVERLAY_PREFIX}/lib/pkgconfig so
that pkg-config can automatically resolve any vendored dependencies.
Recipe for success:
gvm use go1.1
gvm pkgset use current-known-good
# Let's assume that this includes some C headers and native libraries, which
# Go's CGO facility wraps for us. Let's assume that these native
# dependencies are at version V.
gvm pkgset create trial-next-version
# Let's assume that V+1 has come along and you want to safely trial it in
# your workspace.
gvm pkgset use trial-next-version
# Do your work here replicating current-known-good from above, but install
# V+1 into ${GVM_OVERLAY_PREFIX}.
See examples/native for a working example.
Troubleshooting
Sometimes especially during upgrades the state of gvm's files can get mixed up. This is mostly true for upgrade from older version than 0.0.8. Changes are slowing down and a LTR is imminent. But for now rm -rf ~/.gvm will always remove gvm. Stay tuned!
The most recent commit recorded on moovweb/gvm was 2.3 years ago, based on the GitHub push timestamp. The repository has 584 forks — one of the better signals of community interest.
How does moovweb/gvm compare to other Backend projects?
moovweb/gvm is tracked by TopGit in the Backend category, with 11.7k GitHub stars and written in Shell. Browse the Backend topic page on TopGit to compare it against similar projects by stars and activity.
How many stars does moovweb/gvm have?
moovweb/gvm has 11.7k GitHub stars — refresh the page for the live number, or check github.com/moovweb/gvm. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What is moovweb/gvm?
moovweb/gvm (moovweb/gvm) is a Shell project on GitHub. From the project's own README: Go Version Manager
What language is moovweb/gvm written in?
moovweb/gvm is written primarily in Shell. GitHub's language field is based on the largest share of bytes in the default branch.
What topics is moovweb/gvm associated with?
GitHub's repository topics for moovweb/gvm: "dependency-manager", "golang". TopGit's editorial category is Backend.
Why is moovweb/gvm categorized under Backend?
TopGit places moovweb/gvm in the Backend category based on its GitHub topics and description (tagged: "dependency-manager", "golang"). Categories are assigned from real repository metadata, not editorial guesswork.
Read full README in the tab above.
Want a second opinion on gvm?
Ask an AI that can read this page — one click and you get its take on gvm.