Package Management for Golang

Overview

Glide: Vendor Package Management for Golang

glide logo

Are you used to tools such as Cargo, npm, Composer, Nuget, Pip, Maven, Bundler, or other modern package managers? If so, Glide is the comparable Go tool.

Manage your vendor and vendored packages with ease. Glide is a tool for managing the vendor directory within a Go package. This feature, first introduced in Go 1.5, allows each package to have a vendor directory containing dependent packages for the project. These vendor packages can be installed by a tool (e.g. glide), similar to go get or they can be vendored and distributed with the package.

Build Status Build status Go Report Card GoDoc Documentation Status Documentation Status

Go Modules

The Go community is now using Go Modules to handle dependencies. Please consider using that instead of Glide. Glide is now mostly unmaintained.

Features

  • Ease dependency management
  • Support versioning packages including Semantic Versioning 2.0.0 support. Any constraint the github.com/Masterminds/semver package can parse can be used.
  • Support aliasing packages (e.g. for working with github forks)
  • Remove the need for munging import statements
  • Work with all of the go tools
  • Support the VCS tools that Go supports:
    • git
    • bzr
    • hg
    • svn
  • Support custom local and global plugins (see docs/plugins.md)
  • Repository caching and data caching for improved performance.
  • Flatten dependencies resolving version differences and avoiding the inclusion of a package multiple times.
  • Manage and install dependencies on-demand or vendored in your version control system.

How It Works

Glide scans the source code of your application or library to determine the needed dependencies. To determine the versions and locations (such as aliases for forks) Glide reads a glide.yaml file with the rules. With this information Glide retrieves needed dependencies.

When a dependent package is encountered its imports are scanned to determine dependencies of dependencies (transitive dependencies). If the dependent project contains a glide.yaml file that information is used to help determine the dependency rules when fetching from a location or version to use. Configuration from Godep, GB, GOM, and GPM is also imported.

The dependencies are exported to the vendor/ directory where the go tools can find and use them. A glide.lock file is generated containing all the dependencies, including transitive ones.

The glide init command can be use to setup a new project, glide update regenerates the dependency versions using scanning and rules, and glide install will install the versions listed in the glide.lock file, skipping scanning, unless the glide.lock file is not found in which case it will perform an update.

A project is structured like this:

- $GOPATH/src/myProject (Your project)
  |
  |-- glide.yaml
  |
  |-- glide.lock
  |
  |-- main.go (Your main go code can live here)
  |
  |-- mySubpackage (You can create your own subpackages, too)
  |    |
  |    |-- foo.go
  |
  |-- vendor
       |-- github.com
            |
            |-- Masterminds
                  |
                  |-- ... etc.

Take a look at the Glide source code to see this philosophy in action.

Install

The easiest way to install the latest release on Mac or Linux is with the following script:

curl https://glide.sh/get | sh

On Mac OS X you can also install the latest release via Homebrew:

$ brew install glide

On Ubuntu Precise (12.04), Trusty (14.04), Wily (15.10) or Xenial (16.04) you can install from our PPA:

sudo add-apt-repository ppa:masterminds/glide && sudo apt-get update
sudo apt-get install glide

On Ubuntu Zesty (17.04) the package is called golang-glide.

Binary packages are available for Mac, Linux and Windows.

For a development version it is also possible to go get github.com/Masterminds/glide.

To build from source you can:

  1. Clone this repository into $GOPATH/src/github.com/Masterminds/glide and change directory into it
  2. If you are using Go 1.5 ensure the environment variable GO15VENDOREXPERIMENT is set, for example by running export GO15VENDOREXPERIMENT=1. In Go 1.6 it is enabled by default and in Go 1.7 it is always enabled without the ability to turn it off.
  3. Run make build

This will leave you with ./glide, which you can put in your $PATH if you'd like. (You can also take a look at make install to install for you.)

The Glide repo has now been configured to use glide to manage itself, too.

Usage

$ glide create                            # Start a new workspace
$ open glide.yaml                         # and edit away!
$ glide get github.com/Masterminds/cookoo # Get a package and add to glide.yaml
$ glide install                           # Install packages and dependencies
# work, work, work
$ go build                                # Go tools work normally
$ glide up                                # Update to newest versions of the package

Check out the glide.yaml in this directory, or examples in the docs/ directory.

glide create (aliased to init)

Initialize a new workspace. Among other things, this creates a glide.yaml file while attempting to guess the packages and versions to put in it. For example, if your project is using Godep it will use the versions specified there. Glide is smart enough to scan your codebase and detect the imports being used whether they are specified with another package manager or not.

$ glide create
[INFO]	Generating a YAML configuration file and guessing the dependencies
[INFO]	Attempting to import from other package managers (use --skip-import to skip)
[INFO]	Scanning code to look for dependencies
[INFO]	--> Found reference to github.com/Masterminds/semver
[INFO]	--> Found reference to github.com/Masterminds/vcs
[INFO]	--> Found reference to github.com/codegangsta/cli
[INFO]	--> Found reference to gopkg.in/yaml.v2
[INFO]	Writing configuration file (glide.yaml)
[INFO]	Would you like Glide to help you find ways to improve your glide.yaml configuration?
[INFO]	If you want to revisit this step you can use the config-wizard command at any time.
[INFO]	Yes (Y) or No (N)?
n
[INFO]	You can now edit the glide.yaml file. Consider:
[INFO]	--> Using versions and ranges. See https://glide.sh/docs/versions/
[INFO]	--> Adding additional metadata. See https://glide.sh/docs/glide.yaml/
[INFO]	--> Running the config-wizard command to improve the versions in your configuration

The config-wizard, noted here, can be run here or manually run at a later time. This wizard helps you figure out versions and ranges you can use for your dependencies.

glide config-wizard

This runs a wizard that scans your dependencies and retrieves information on them to offer up suggestions that you can interactively choose. For example, it can discover if a dependency uses semantic versions and help you choose the version ranges to use.

glide get [package name]

You can download one or more packages to your vendor directory and have it added to your glide.yaml file with glide get.

$ glide get github.com/Masterminds/cookoo

When glide get is used it will introspect the listed package to resolve its dependencies including using Godep, GPM, Gom, and GB config files.

glide update (aliased to up)

Download or update all of the libraries listed in the glide.yaml file and put them in the vendor directory. It will also recursively walk through the dependency packages to fetch anything that's needed and read in any configuration.

$ glide up

This will recurse over the packages looking for other projects managed by Glide, Godep, gb, gom, and GPM. When one is found those packages will be installed as needed.

A glide.lock file will be created or updated with the dependencies pinned to specific versions. For example, if in the glide.yaml file a version was specified as a range (e.g., ^1.2.3) it will be set to a specific commit id in the glide.lock file. That allows for reproducible installs (see glide install).

To remove any nested vendor/ directories from fetched packages see the -v flag.

glide install

When you want to install the specific versions from the glide.lock file use glide install.

$ glide install

This will read the glide.lock file and install the commit id specific versions there.

When the glide.lock file doesn't tie to the glide.yaml file, such as there being a change, it will provide a warning. Running glide up will recreate the glide.lock file when updating the dependency tree.

If no glide.lock file is present glide install will perform an update and generate a lock file.

To remove any nested vendor/ directories from fetched packages see the -v flag.

glide novendor (aliased to nv)

When you run commands like go test ./... it will iterate over all the subdirectories including the vendor directory. When you are testing your application you may want to test your application files without running all the tests of your dependencies and their dependencies. This is where the novendor command comes in. It lists all of the directories except vendor.

$ go test $(glide novendor)

This will run go test over all directories of your project except the vendor directory.

glide name

When you're scripting with Glide there are occasions where you need to know the name of the package you're working on. glide name returns the name of the package listed in the glide.yaml file.

glide tree

Glide includes a few commands that inspect code and give you details about what is imported. glide tree is one such command. Running it gives data like this:

$ glide tree
github.com/Masterminds/glide
	github.com/Masterminds/cookoo   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo)
		github.com/Masterminds/cookoo/io   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo/io)
	github.com/Masterminds/glide/cmd   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/cmd)
		github.com/Masterminds/cookoo   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo)
			github.com/Masterminds/cookoo/io   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo/io)
		github.com/Masterminds/glide/gb   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/gb)
		github.com/Masterminds/glide/util   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/util)
			github.com/Masterminds/vcs   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/vcs)
		github.com/Masterminds/glide/yaml   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/yaml)
			github.com/Masterminds/glide/util   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/util)
				github.com/Masterminds/vcs   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/vcs)
			github.com/Masterminds/vcs   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/vcs)
			gopkg.in/yaml.v2   (/Users/mfarina/Code/go/src/gopkg.in/yaml.v2)
		github.com/Masterminds/semver   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/semver)
		github.com/Masterminds/vcs   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/vcs)
		github.com/codegangsta/cli   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/codegangsta/cli)
	github.com/codegangsta/cli   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/codegangsta/cli)
	github.com/Masterminds/cookoo   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo)
		github.com/Masterminds/cookoo/io   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/cookoo/io)
	github.com/Masterminds/glide/gb   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/gb)
	github.com/Masterminds/glide/util   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/util)
		github.com/Masterminds/vcs   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/vcs)
	github.com/Masterminds/glide/yaml   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/yaml)
		github.com/Masterminds/glide/util   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/util)
			github.com/Masterminds/vcs   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/vcs)
		github.com/Masterminds/vcs   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/vcs)
		gopkg.in/yaml.v2   (/Users/mfarina/Code/go/src/gopkg.in/yaml.v2)
	github.com/Masterminds/semver   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/semver)
	github.com/Masterminds/vcs   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/Masterminds/vcs)
	github.com/codegangsta/cli   (/Users/mfarina/Code/go/src/github.com/Masterminds/glide/vendor/github.com/codegangsta/cli)

This shows a tree of imports, excluding core libraries. Because vendoring makes it possible for the same package to live in multiple places, glide tree also prints the location of the package being imported.

This command is deprecated and will be removed in the near future.

glide list

Glide's list command shows an alphabetized list of all the packages that a project imports.

$ glide list
INSTALLED packages:
	vendor/github.com/Masterminds/cookoo
	vendor/github.com/Masterminds/cookoo/fmt
	vendor/github.com/Masterminds/cookoo/io
	vendor/github.com/Masterminds/cookoo/web
	vendor/github.com/Masterminds/semver
	vendor/github.com/Masterminds/vcs
	vendor/github.com/codegangsta/cli
	vendor/gopkg.in/yaml.v2

glide help

Print the glide help.

$ glide help

glide --version

Print the version and exit.

$ glide --version
glide version 0.12.0

glide.yaml

For full details on the glide.yaml files see the documentation.

The glide.yaml file does two critical things:

  1. It names the current package
  2. It declares external dependencies

A brief glide.yaml file looks like this:

package: github.com/Masterminds/glide
import:
  - package: github.com/Masterminds/semver
  - package: github.com/Masterminds/cookoo
    version: ^1.2.0
    repo: [email protected]:Masterminds/cookoo.git

The above tells glide that...

  1. This package is named github.com/Masterminds/glide
  2. That this package depends on two libraries.

The first library exemplifies a minimal package import. It merely gives the fully qualified import path.

When Glide reads the definition for the second library, it will get the repo from the source in repo, checkout the latest version between 1.2.0 and 2.0.0, and put it in github.com/Masterminds/cookoo in the vendor directory. (Note that package and repo can be completely different)

TIP: The version is either VCS dependent and can be anything that can be checked out or a semantic version constraint that can be parsed by the github.com/ Masterminds/semver package. For example, with Git this can be a branch, tag, or hash. This varies and depends on what's supported in the VCS.

TIP: In general, you are advised to use the base package name for importing a package, not a subpackage name. For example, use github.com/kylelemons/go-gypsy and not github.com/kylelemons/go-gypsy/yaml.

Supported Version Control Systems

The Git, SVN, Mercurial (Hg), and Bzr source control systems are supported. This happens through the vcs package.

Frequently Asked Questions (F.A.Q.)

Q: Why does Glide have the concept of sub-packages when Go doesn't?

In Go every directory is a package. This works well when you have one repo containing all of your packages. When you have different packages in different VCS locations things become a bit more complicated. A project containing a collection of packages should be handled with the same information including the version. By grouping packages this way we are able to manage the related information.

Q: bzr (or hg) is not working the way I expected. Why?

These are works in progress, and may need some additional tuning. Please take a look at the vcs package. If you see a better way to handle it please let us know.

Q: Should I check vendor/ into version control?

That's up to you. It's not necessary, but it may also cause you extra work and lots of extra space in your VCS. There may also be unforeseen errors (see an example).

Q: How do I import settings from GPM, Godep, gom or gb?

There are two parts to importing.

  1. If a package you import has configuration for GPM, Godep, gom or gb Glide will recursively install the dependencies automatically.
  2. If you would like to import configuration from GPM, Godep, gom or gb to Glide see the glide import command. For example, you can run glide import godep for Glide to detect the projects Godep configuration and generate a glide.yaml file for you.

Each of these will merge your existing glide.yaml file with the dependencies it finds for those managers, and then emit the file as output. It will not overwrite your glide.yaml file.

You can write it to file like this:

$ glide import godep -f glide.yaml

Q: Can Glide fetch a package based on OS or Arch?

A: Yes. Using the os and arch fields on a package, you can specify which OSes and architectures the package should be fetched for. For example, the following package will only be fetched for 64-bit Darwin/OSX systems:

- package: some/package
  os:
    - darwin
  arch:
    - amd64

The package will not be fetched for other architectures or OSes.

LICENSE

This package is made available under an MIT-style license. See LICENSE.txt.

Thanks!

We owe a huge debt of gratitude to the GPM and GVP projects, which inspired many of the features of this package. If glide isn't the right Go project manager for you, check out those.

The Composer (PHP), npm (JavaScript), and Bundler (Ruby) projects all inspired various aspects of this tool, as well.

The Name

Aside from being catchy, "glide" is a contraction of "Go Elide". The idea is to compress the tasks that normally take us lots of time into a just a few seconds.

Issues
  • bash on windows has error

    bash on windows has error

    I use glide in bash on windows. when i exec glide install.i got the follow error message

    [INFO]  --> Exporting golang.org/x/net
    [INFO]  --> Exporting golang.org/x/crypto/acme/autocert
    [INFO]  --> Exporting golang.org/x/crypto
    [INFO]  Replacing existing vendor dependencies
    [ERROR] remove /tmp/glide-vendor220918663/vendor/github.com/google/go-github/github: directory not empty
    [ERROR] Unable to export dependencies to vendor directory: remove /mnt/c/Users/Administrator/go/src/github.com/freshcn/go-id-builder/vendor/github.com/google/go-github/github: directory not empty
    

    there has the same error on v0.12.3 and 0.13.0-dev

    bug 
    opened by freshcn 38
  • Initial integration of gps into glide

    Initial integration of gps into glide

    This pull request swaps in gps for much of the core glide engine.

    This checklist is sorta starting in media res of a long-running pull request...but hey, better late than never.

    This checklist represents what I think should be necessary to at least merge this PR, though not necessarily be a complete, finished conversion. It might be preferable to merge this into a separate branch, so we can then iterate on other issues in smaller PRs.

    • [x] Get Kubernetes working. This is a nice torture test, and so a pretty thorough exercise for gps.
    • [x] Store versions alongside revisions in the lock file.
    • [x] Add general support (a method? and then, ofc, an underlying field) for reporting the version of a manifest or lock file. (EDIT: there's no explicit version field, b/c that would be a shitshow for users. Instead, we use variations in the format to clearly delineate between legacy and current file formats)
    • [x] Create legacy versions of both cfg.Config and cfg.Lock, and have the unmarshaler detect and report accordingly.
    • Fully convert:
      • [ ] glide install
      • [ ] glide get
      • [ ] glide update
    • [ ] Remove dead code - the old resolver, etc.
    opened by sdboyer 36
  • Checking in the vendor folder in Git

    Checking in the vendor folder in Git

    Hi there,

    This is more like a question, not an issue...

    I just started using glide and I noticed a couple of things:

    • Pinning does not occur by default
    • Dependency repo's were added in a nested fashion

    So, when adding the changed files, Git reported the files inside the vendor folder that just contained the commit id. So I thought it was great because, first because it isn't that much of extra space and second if something breaks after somebody runs glide up because of a change in the version of a dependency, you're able to look in your commit history what was the commit id at which the dependency was the last time everything worked fine.

    But then I noticed that if the vendor folder already exists, glide up doesn't work well. So I may have to ignore the full folder.

    I don't know exactly why it doesn't work or what is it trying to do, I just know that after removing the folder everything worked fine.

    So my question is ... can I make it work having an existing vendor folder that only contains references to the commit ids of the dependencies?

    opened by fervic 32
  • Add flatten open to imports

    Add flatten open to imports

    This is a prototype of #55

    It adds a flatten option that takes true or false as an option.

    When set to true, any sub package vendored in with the same name will be skipped. When set to false, business as usual.

    A few other changes of note:

    • []*Dependency was made into a type Dependencies so I could put common Get by name functionality on it. There may be code elsewhere that can use this.
    • Added boolOrDefault to work with the yaml and having a default bool set
    • Added the concept of a Config.Parent and some funs related to it traversing up the tree.
    • Enhanced some of the yaml tests for new and existing functionality.
    opened by interlock 30
  • `glide update` vendors current repo if it contains subpackages

    `glide update` vendors current repo if it contains subpackages

    Trying to setup glide for first time on an application target that contains subpackages. The problem I'm running into is that it vendors the current repo subpackages since they're imported from the main package. That means go build uses the vendor directory rather than the primary source which may contain local edits.

    It's a private repo but the glide project has the same setup and repros the issue.

    ~/code/go/src/github.com/masterminds/glide ❯ glide update
    [INFO] Downloading dependencies. Please wait...
    [INFO] Fetching updates for github.com/Masterminds/semver.
    [INFO] Fetching updates for gopkg.in/yaml.v2.
    [INFO] Fetching updates for github.com/Masterminds/vcs.
    [INFO] Fetching updates for github.com/codegangsta/cli.
    [INFO] Detected semantic version. Setting version for github.com/Masterminds/semver to 1.0.1.
    [INFO] Detected semantic version. Setting version for github.com/Masterminds/vcs to 1.4.0.
    [INFO] Resolving imports
    [INFO] Not found in vendor/: github.com/Masterminds/glide/action (1)
    [INFO] Not found in vendor/: github.com/Masterminds/glide/msg (1)
    [INFO] Not found in vendor/: github.com/Masterminds/glide/path (1)
    [INFO] Not found in vendor/: github.com/Masterminds/glide/repo (1)
    [INFO] Not found in vendor/: github.com/Masterminds/glide/util (1)
    [INFO] Not found in vendor/: github.com/Masterminds/glide/cfg (1)
    [INFO] Not found in vendor/: github.com/Masterminds/glide/dependency (1)
    [INFO] Not found in vendor/: github.com/Masterminds/glide/gb (1)
    [INFO] Not found in vendor/: github.com/Masterminds/glide/godep (1)
    [INFO] Not found in vendor/: github.com/Masterminds/glide/gpm (1)
    [INFO] Not found in vendor/: github.com/Masterminds/glide/tree (1)
    [INFO] Not found in vendor/: github.com/Masterminds/glide/importer (1)
    [INFO] Downloading dependencies. Please wait...
    [INFO] Fetching updates for github.com/Masterminds/glide.
    [INFO] Setting references for remaining imports
    [INFO] Project relies on 5 dependencies.
    

    Is there some other way I should be bootstrapping my project so that glide doesn't try to vendor these subpackages? In the glide example those subpackages aren't in the glide.lock file but a glide update adds them.

    opened by neilpa 28
  • glide get did not fetch recursive dependencies

    glide get did not fetch recursive dependencies

    Hi,

    I hope i did not misread the readme in

    When glide get is used it will introspect the listed package to resolve its dependencies including using Godep, GPM, Gom, and GB config files.

    $ go version
    go version go1.6.2 linux/amd64
    $ glide -v
    glide version 0.10.2-86-g5865b8e
    $ mkdir test
    $ cd test
    $ glide create
    [INFO]  Generating a YAML configuration file and guessing the dependencies
    [INFO]  Attempting to import from other package managers (use --skip-import to skip)
     $ glide get github.com/mh-cbon/verbose
    [INFO]  Preparing to install 1 package.
    [INFO]  Importing github.com/mh-cbon/verbose
    [INFO]  Downloading dependencies. Please wait...
    [INFO]  Fetching updates for github.com/mh-cbon/verbose.
    [INFO]  Resolving imports
    [INFO]  Downloading dependencies. Please wait...
    $ ll vendor/github.com/mh-cbon/
    total 4
    drwxrwxr-x 6 mh-cbon mh-cbon 4096 10 juin  14:12 verbose
    $ ll vendor/
    total 4
    drwxrwxr-x 3 mh-cbon mh-cbon 4096 10 juin  14:12 github.com
    $ 
    

    Notes: glide update works fine and pull dependencies recursively.

    opened by mh-cbon 27
  • subpackage recognised as independent package?

    subpackage recognised as independent package?

    Hi,

    I'm using glide for the first time today, so maybe I just misunderstood something, but here's the problem:

    After glide create, fixing(?) a private repo entry, and glide install the latter always outputs warnings that it's "Unable to checkout" a (sub)package. Glide however did put the package into the vendor dir, just as the other subpackages of the same repo (that didn't get a warning).

    Here's the glide.yaml import entry I edited:

    - package: src.ybit.eu/ybit/yamcha
      repo: [email protected]:ybit/yamcha.git
      vcs: git
      subpackages:
      - /apibase
      - /helpers
      - /server
      - /storage
    

    The one from glide.lock:

    - name: src.ybit.eu/ybit/yamcha
      version: d7880c188617d3d3bbdaa991b0a597809f8d0135
      repo: [email protected]:ybit/yamcha.git
      vcs: git
      subpackages:
      - /apibase
      - /helpers
      - /server
      - /storage
    - name: src.ybit.eu/ybit/yamcha/helpers
      version: ""
    

    The glide install --debug output (snippet):

    [...]
    [DEBUG] ----> Scanning src.ybit.eu/ybit/yamcha
    [DEBUG] Looking in /Users/bo/src/go/src/src.ybit.eu/ybit/seo360/vendor/src.ybit.eu/ybit/yamcha/Godeps/ for a Godeps.json file.
    [DEBUG] Looking in /Users/bo/src/go/src/src.ybit.eu/ybit/seo360/vendor/src.ybit.eu/ybit/yamcha/vendor/ for a manifest file.
    [INFO] Scanning src.ybit.eu/ybit/yamcha for dependencies.
    [DEBUG] => Scanning github.com/didip/tollbooth
    [DEBUG] ✨☆ GOPATH dependency: github.com/didip/tollbooth
    [DEBUG] => Scanning github.com/gorilla/mux
    [DEBUG] => Scanning github.com/gorilla/sessions
    [DEBUG] ✨☆ GOPATH dependency: github.com/gorilla/sessions
    [DEBUG] => Scanning github.com/jinzhu/gorm
    [DEBUG] => Scanning github.com/facebookgo/grace/gracehttp
    [DEBUG] ✨☆ GOPATH dependency: github.com/facebookgo/grace
    [DEBUG] => Scanning github.com/gorilla/handlers
    [DEBUG] ✨☆ GOPATH dependency: github.com/gorilla/handlers
    [DEBUG] => Scanning src.ybit.eu/ybit/yamcha/helpers
    [DEBUG] ✨☆ GOPATH dependency: src.ybit.eu/ybit/yamcha/helpers
    [DEBUG] => Scanning github.com/lib/pq
    [DEBUG] ----> Updating all dependencies for "src.ybit.eu/ybit/yamcha" (5)
    [DEBUG] ----> Already updated gopkg.in/gemnasium/logrus-airbrake-hook.v2
    [DEBUG] Getting project github.com/gorilla/handlers (/Users/bo/src/go/src/src.ybit.eu/ybit/seo360/vendor/github.com/gorilla/handlers)
    [INFO] Fetching updates for github.com/gorilla/handlers.
    [DEBUG] Attempting to find current branch for https://github.com/gorilla/handlers
    [DEBUG] Saving default branch for https://github.com/gorilla/handlers
    [DEBUG] ----> Already updated github.com/Sirupsen/logrus
    [DEBUG] ----> Already updated golang.org/x/crypto
    [DEBUG] ----> Already updated src.ybit.eu/ybit/yamcha
    [DEBUG] ----> Already updated gopkg.in/airbrake/gobrake.v2
    [DEBUG] ----> Already updated github.com/jinzhu/inflection
    [DEBUG] ----> Already updated github.com/lib/pq
    [DEBUG] Getting project github.com/didip/tollbooth (/Users/bo/src/go/src/src.ybit.eu/ybit/seo360/vendor/github.com/didip/tollbooth)
    [INFO] Fetching updates for github.com/didip/tollbooth.
    [DEBUG] Attempting to find current branch for https://github.com/didip/tollbooth
    [DEBUG] Saving default branch for https://github.com/didip/tollbooth
    [DEBUG] ----> Already updated github.com/jinzhu/gorm
    [DEBUG] Getting project github.com/gorilla/sessions (/Users/bo/src/go/src/src.ybit.eu/ybit/seo360/vendor/github.com/gorilla/sessions)
    [INFO] Fetching updates for github.com/gorilla/sessions.
    [DEBUG] Attempting to find current branch for https://github.com/gorilla/sessions
    [DEBUG] Saving default branch for https://github.com/gorilla/sessions
    [DEBUG] Getting project src.ybit.eu/ybit/yamcha/helpers (/Users/bo/src/go/src/src.ybit.eu/ybit/seo360/vendor/src.ybit.eu/ybit/yamcha/helpers)
    [INFO] Fetching updates for src.ybit.eu/ybit/yamcha/helpers.
    [WARN] src.ybit.eu/ybit/yamcha/helpers appears to be a vendored package. Unable to update. Consider the '--update-vendored' flag.
    [WARN] Problem setting version on src.ybit.eu/ybit/yamcha/helpers: Cannot detect VCS
    [DEBUG] ----> Already updated github.com/gorilla/mux
    [DEBUG] ----> Already updated github.com/gorilla/context
    [DEBUG] Getting project github.com/facebookgo/grace (/Users/bo/src/go/src/src.ybit.eu/ybit/seo360/vendor/github.com/facebookgo/grace)
    [INFO] Fetching updates for github.com/facebookgo/grace.
    [...]
    

    Also this warning right before "Project relies on X dependencies":

    [WARN] Problem setting version on src.ybit.eu/ybit/yamcha/helpers: Cannot detect VCS (flatten)
    

    Did I misunderstand something or is this a bug?

    opened by stroborobo 26
  • Vendor the dependencies of the sub-packages only, not of the parent package

    Vendor the dependencies of the sub-packages only, not of the parent package

    The dependent packages can have subpackages, but what is their use? They don't seem to be used any where.

    For example, my project uses github.com/coreos/etcd/client. I have the following entry as a dependency,

    - package: github.com/coreos/etcd
      version: v2.2.2
      subpackages:
      - /client
    

    I had assumed that because subpackages had been provided, glide would just resolve the dependencies of the subpackages. But instead, glide resolves dependencies of etcd and pulls in way too many dependent packages, which I have no use of in my project.

    I want to know if this is the expected behaviour?

    enhancement 
    opened by kshlm 25
  • Support a style of npm shrinkwrap

    Support a style of npm shrinkwrap

    glide pin would change to directly generating a glide-pin.yaml file. glide install would check if a glide-pin.yaml file existed, and if it did would install using that instead of glide.yaml glide up(date) would reference glide.yaml and would update the underlying repositories, hopefully having the semantic version support discussed in #52.

    This can be achieved currently using the global -y option, but I think having in-tool support would make adoption easier. Especially when recursing through other packages that might have glide inside them, there is no option for a user to choose which YAML file to use, so in the case of someone rolling this themselves, they would require their default yaml file be the pinned version.

    Thanks for any consideration.

    opened by itsjamie 25
  • Glide on Windows writes the lock file with incorrect slashes

    Glide on Windows writes the lock file with incorrect slashes

    Deduplication and identification of included packages seems to be affected as well.

    Here's the diff of what glide did when running glide up on windows:

    diff --git a/glide.lock b/glide.lock
    index 03c385f..a14e606 100644
    --- a/glide.lock
    +++ b/glide.lock
    @@ -1,19 +1,47 @@
     hash: 46cd6d2d3f2840288fad453b3d7d8309d53ed56f84794a6edba7c71968b95142
    -updated: 2016-01-28T01:15:34.905936244-08:00
    +updated: 2016-01-29T12:20:43.7050665-08:00
     imports:
     - name: github.com/Azure/go-autorest
    -  version: 20a00a4f1f2a2abdfb98e6beb1126f1d36d7063a
    +  version: 8ced4882956df3128b6d81a183d8e0757ac825b3
       subpackages:
       - /autorest
       - autorest/azure
       - autorest/date
       - autorest/to
     - name: github.com/dgrijalva/jwt-go
    -  version: f164e17f59b82642a3895ba065c385db6c547344
    +  version: afef698c326bfd906b11659432544e5aae441d44
    +- name: github.com\Azure\go-autorest
    +  version: 8ced4882956df3128b6d81a183d8e0757ac825b3
    +- name: github.com\dgrijalva\jwt-go
    +  version: afef698c326bfd906b11659432544e5aae441d44
     - name: golang.org/x/crypto
    -  version: 346896d57731cb5670b36c6178fc5519f3225980
    +  version: 1f22c0103821b9390939b6776727195525381532
       subpackages:
       - /pkcs12
    +- name: golang.org\x\crypto
    +  version: 1f22c0103821b9390939b6776727195525381532
    +- name: golang.org\x\crypto\blowfish
    +  version: ""
    +- name: golang.org\x\crypto\nacl\secretbox
    +  version: ""
    +- name: golang.org\x\crypto\openpgp\armor
    +  version: ""
    +- name: golang.org\x\crypto\openpgp\errors
    +  version: ""
    +- name: golang.org\x\crypto\openpgp\packet
    +  version: ""
    +- name: golang.org\x\crypto\openpgp\s2k
    +  version: ""
    +- name: golang.org\x\crypto\pkcs12
    +  version: ""
    +- name: golang.org\x\crypto\pkcs12\internal\rc2
    +  version: ""
    +- name: golang.org\x\crypto\poly1305
    +  version: ""
    +- name: golang.org\x\crypto\salsa20\salsa
    +  version: ""
     - name: gopkg.in/check.v1
    -  version: 11d3bc7aa68e238947792f30573146a3231fc0f1
    +  version: 4f90aeace3a26ad7021961c297b22c42160c7b25
    +- name: gopkg.in\check.v1
    +  version: 4f90aeace3a26ad7021961c297b22c42160c7b25
     devImports: []
    

    Note that go-autorest is re-added to the lock file, even though it's already there.

    Here's the diff it should have created: (this was generated from glide up on a Linux box)

    diff --git a/glide.lock b/glide.lock
    index 58c0c35..03c385f 100644
    --- a/glide.lock
    +++ b/glide.lock
    @@ -1,21 +1,19 @@
     hash: 46cd6d2d3f2840288fad453b3d7d8309d53ed56f84794a6edba7c71968b95142
    -updated: 2016-01-29T13:16:26.939463551-08:00
    +updated: 2016-01-28T01:15:34.905936244-08:00
     imports:
     - name: github.com/Azure/go-autorest
    -  version: 8ced4882956df3128b6d81a183d8e0757ac825b3
    +  version: 20a00a4f1f2a2abdfb98e6beb1126f1d36d7063a
       subpackages:
       - /autorest
       - autorest/azure
       - autorest/date
       - autorest/to
     - name: github.com/dgrijalva/jwt-go
    -  version: afef698c326bfd906b11659432544e5aae441d44
    -  subpackages:
    -  - .
    +  version: f164e17f59b82642a3895ba065c385db6c547344
     - name: golang.org/x/crypto
    -  version: 1f22c0103821b9390939b6776727195525381532
    +  version: 346896d57731cb5670b36c6178fc5519f3225980
       subpackages:
       - /pkcs12
     - name: gopkg.in/check.v1
    -  version: 4f90aeace3a26ad7021961c297b22c42160c7b25
    +  version: 11d3bc7aa68e238947792f30573146a3231fc0f1
     devImports: []
    
    bug 
    opened by colemickens 23
  • Proposal: Ability to configure VCS rewrites

    Proposal: Ability to configure VCS rewrites

    So I realize this is a bit of a special case, but wanted to run by you to see if you'd be open to accepting a PR.

    At my place of employment, we are switching to Glide (from Godeps). At the same time, we'd like to move away from vendoring. Glide is great for this, and we get reproducible builds when GitHub is up, but want to guard against repo renames/GH instability.

    Internally, we have a read-through cache/mirror of GitHub repos, so that if we pull from a special git URI (e.g. git clone [email protected]:github/Masterminds/glide) it will read the latest state from GitHub, but still return you the code if GitHub goes down (via gitolite's mirroring options).

    We'd like the ability to configure glide internally, such that if an engineer adds a github.com dependency to their glide.lock/yaml, it will get pulled through our mirror.

    Alternatively, we are open to patching glide on the client side, such that any "glide get github.com/..." will result in the proper VCS settings in glide.yaml. This is slightly less preferable because then we have to distribute a patched glide.

    I'm open to implementing this on an internal fork if you don't foresee others needing this functionality.

    What I'm thinking is a ~/.glide.yaml that has a block like:

    vcs:
      rewrites:
        from: [email protected]
        to: [email protected]:github/
    

    What do you think?

    duplicate 
    opened by ascandella 21
  • Problems installing glide

    Problems installing glide

    Hi, I am experiencing a problem migrating git submodules to go mod. I figured glide could help to ease the transition. Unfortunately, many of the available mechanisms for installing glide for legacy use appear to be down.

    $ curl https://glide.sh/get | sh
    $
    
    $ \curl https://glide.sh/get
    curl: (60) SSL: no alternative certificate subject name matches target host name 'glide.sh'
    More details here: https://curl.haxx.se/docs/sslcerts.html
    
    curl failed to verify the legitimacy of the server and therefore could not
    establish a secure connection to it. To learn more about this situation and
    how to fix it, please visit the web page mentioned above.
    
    $ go install github.com/Masterminds/glide
    go install: version is required when current directory is not in a module
            Try 'go install github.com/Masterminds/[email protected]' to install the latest version
    
    $ go install github.com/Masterminds/[email protected]
    go: downloading github.com/Masterminds/glide v0.13.3
    go: finding module for package gopkg.in/yaml.v2
    go: finding module for package github.com/Masterminds/semver
    go: finding module for package github.com/codegangsta/cli
    go: finding module for package github.com/Masterminds/vcs
    go: finding module for package github.com/mitchellh/go-homedir
    go: downloading github.com/mitchellh/go-homedir v1.1.0
    go: downloading github.com/Masterminds/semver v1.5.0
    go: downloading github.com/codegangsta/cli v1.22.5
    go: found github.com/codegangsta/cli in github.com/codegangsta/cli v1.22.5
    go: found github.com/Masterminds/semver in github.com/Masterminds/semver v1.5.0
    go: found github.com/Masterminds/vcs in github.com/Masterminds/vcs v1.13.1
    go: found github.com/mitchellh/go-homedir in github.com/mitchellh/go-homedir v1.1.0
    go: found gopkg.in/yaml.v2 in gopkg.in/yaml.v2 v2.4.0
    go: github.com/Masterminds/glide imports
            github.com/codegangsta/cli: github.com/codegangsta/[email protected]: parsing go.mod:
            module declares its path as: github.com/urfave/cli
                    but was required as: github.com/codegangsta/cli
    
    • Relates to https://github.com/Masterminds/glide/issues/1077
    • Relates to https://github.com/Masterminds/glide/issues/1079

    As a workaround, I am using one of the prebuilt binaries.

    https://github.com/Masterminds/glide/releases/tag/v0.13.3

    opened by mcandre 0
  • [ERROR] Failed to retrieve a list of dependencies: Error resolving imports

    [ERROR] Failed to retrieve a list of dependencies: Error resolving imports

    Hi

    We are getting an error during build. the Error is:

    [ERROR] Failed to retrieve a list of dependencies: Error resolving imports [Container] 2021/06/30 10:19:07 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: glide --debug install. Reason: exit status 1

    we have tride glide cc but it didn't work

    we are using the Glide version 0.13.3

    opened by westacton-ronald 0
  • Sorry, we dont have a dist for your system: linux armv7

    Sorry, we dont have a dist for your system: linux armv7

    Hello, is it possible to have a distro for my Raspberry Pi4?

    Many thanks, Ray

    curl https://glide.sh/get | sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4833 100 4833 0 0 11371 0 --:--:-- --:--:-- --:--:-- 11371 ARCH=armv7 OS=linux Using curl as download tool Getting https://glide.sh/version TAG=v0.13.3 GLIDE_DIST=glide-v0.13.3-linux-armv7.tar.gz Downloading https://github.com/Masterminds/glide/releases/download/v0.13.3/glide-v0.13.3-linux-armv7.tar.gz Did not find a release for your system: linux armv7 Trying to find a release on the github api. LATEST_RELEASE_URL=https://api.github.com/repos/Masterminds/glide/releases/tags/v0.13.3 Getting https://api.github.com/repos/Masterminds/glide/releases/tags/v0.13.3 Sorry, we dont have a dist for your system: linux armv7 You can ask one here: https://github.com/Masterminds/glide/issues Fail to install glide

    opened by raystatham 0
  • vendor/vendor after new dependency

    vendor/vendor after new dependency

    I have v0.13.2 and i just experienced a very strange bug. I added new dependency with glide get, as usual, but i ended up with two vendor directories:

    /vendor/vendor/github.com/... /vendor/google.golang.org/

    which broke everything. Once I deleted the entire vendor and installed with glide i, all is good. This never happened so I have no idea wtf was that but it is maybe worth reporting.

    opened by ivanjaros 1
Releases(v0.13.3)
Go Package Manager (gopm) is a package manager and build tool for Go.

?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? In favor of Go Modules Proxy since Go 1.11, this pr

Go Package Manager 2.5k Apr 5, 2022
Package core is a service container that elegantly bootstrap and coordinate twelve-factor apps in Go.

Package core is a service container that elegantly bootstrap and coordinate twelve-factor apps in Go. Background The twelve-factor methodology has pro

DoNews 49 Feb 24, 2022
🦄 Easy, fast and open-source local package manager for Python!

Unikorn ?? Easy, fast and open-source local package manager for Python! Key Features Speed: You can add a package in one second.

Penguen 6 Dec 11, 2021
GoLobby DotEnv is a lightweight package for loading dot env (.env) files into structs for Go projects

DotEnv GoLobby DotEnv is a lightweight package for loading dot env (.env) files into structs for Go projects Documentation Supported Versions It requi

GoLobby 12 Apr 5, 2022
gPac - a linux package manager

gPac is a useless package manager. It is included in the gSuite, which is a suite of tools written in GO. gPac is a KISS - like package manager.

Luis 4 Mar 13, 2022
GoFish is a cross-platform systems package manager, bringing the ease of use of Homebrew to Linux and Windows.

GoFish is a cross-platform systems package manager, bringing the ease of use of Homebrew to Linux and Windows.

Fishworks 805 May 10, 2022
Package manager for future projects

PCKGER is a package manager for my next project but when it will be able to build binaries and move libs it will be used like a normal package manager

null 0 Dec 20, 2021
gobin is a package manager for /go/bin

gobin gobin is a package manager for /go/bin Features List installed packages. Check for updates. Install packages (like go install). Uninstall packag

Andrey Burov 18 Feb 19, 2022
📦 An independent package manager for compiled binaries.

stew An independent package manager for compiled binaries. Features Easily distribute binaries across teams and private repositories. Get the latest r

Marwan Hawari 97 Apr 27, 2022
A simple dependency manager for Go (golang), inspired by Bundler.

Goop A dependency manager for Go (golang), inspired by Bundler. It is different from other dependency managers in that it does not force you to mess w

Peter Jihoon Kim 779 Mar 7, 2022
Golang Version Manager

g 注意:master分支可能处于开发之中并非稳定版本,请通过tag下载稳定版本的源代码,或通过release下载已编译的二进制可执行文件。 g是一个Linux、macOS、Windows下的命令行工具,可以提供一个便捷的多版本go环境的管理和切换。 特性 支持列出可供安装的go版本号 支持列出已安

voidint 650 May 7, 2022
Fetch license information for all direct and indirect dependencies of your Golang project

gocomply beta Give open source Golang developers the credit they deserve, follow your legal obligations, and save time with gocomply. This tiny little

Tawesoft 15 Jan 8, 2022
A tool for secrets management, encryption as a service, and privileged access management

Vault Please note: We take Vault's security and our users' trust very seriously. If you believe you have found a security issue in Vault, please respo

HashiCorp 24.1k May 12, 2022
A tool for secrets management, encryption as a service, and privileged access management

Deploy HCP Vault & AWS Transit Gateways via Terraform https://medium.com/hashicorp-engineering/deploying-hcp-vault-using-the-hcp-terraform-provider-5e

Temur Yunusov 0 Nov 23, 2021
Kstone is an etcd management platform, providing cluster management, monitoring, backup, inspection, data migration, visual viewing of etcd data, and intelligent diagnosis.

Kstone 中文 Kstone is an etcd management platform, providing cluster management, monitoring, backup, inspection, data migration, visual viewing of etcd

TKEStack 529 May 13, 2022
Zms - The Bhojpur ZMS is a software-as-a-service product applied in different risk management areas. It is a containment Zone Management System based on Bhojpur.NET Platform.

Bhojpur ZMS - Zone Management System The Bhojpur ZMS is a software-as-a-service product used as a Zone Management System based on Bhojpur.NET Platform

Bhojpur Consulting 0 Jan 2, 2022
Wmi - One hot Go WMI package. Package wmi provides an interface to WMI. (Windows Management Instrumentation)

wmi Package wmi provides an interface to WMI. (Windows Management Instrumentation) Install go get -v github.com/moonchant12/wmi Import import "github.

MoonChant 2 Apr 22, 2022
Package Management for Golang

Glide: Vendor Package Management for Golang Are you used to tools such as Cargo, npm, Composer, Nuget, Pip, Maven, Bundler, or other modern package ma

null 8.2k May 17, 2022
Tool to check for dependency confusion vulnerabilities in multiple package management systems

Confused A tool for checking for lingering free namespaces for private package names referenced in dependency configuration for Python (pypi) requirem

Visma Product Security 416 May 10, 2022
Package cache is a middleware that provides the cache management for Flamego.

cache Package cache is a middleware that provides the cache management for Flamego. Installation The minimum requirement of Go is 1.16. go get github.

Flamego 10 Jan 16, 2022
Golang-module-references - A reference for how to setup a Golang project with modules - Task Management + Math Examples

Golang Module Project The purpose of this project is to act as a reference for setting up future Golang projects using modules. This project has a mat

Bob Bass 0 Jan 2, 2022
Simple hosts file management in Golang (deprecated).

Goodhosts (deprecated) This library is now deprecated. See the goodhosts organisation for the current maintained version. Simple hosts file (/etc/host

Lex T 69 Mar 17, 2022
Booking Identity Management For Golang

third_party/OpenAPI This directory contains HTML, Javascript, and CSS assets that dynamically generate Swagger documentation from a Swagger-compliant

null 2 Feb 25, 2022
Golang based User creation and Management application. GORM, Fiber, JWT

User Creation and Management app (BACK-END) Auth Features: Create Clients (regular password + 6 one-time passwords + (optional) QR code and Secret for

Artūras 4 Apr 25, 2022
Http Plugin Management For Golang

Http Plugin Management Install & Use Inline plugin PluginManager Example EnvoyPlugin Example 中文 Http Plugin Management Install & Use Use the following

null 4 Jan 26, 2022
Go-logging-logrus - Learn how to log management in golang with logrus

Learn how to logging in golang with logrus How to run this project git clone htt

Vandy Ahmad 0 Jan 19, 2022
A Go (golang) package that enhances the standard database/sql package by providing powerful data retrieval methods as well as DB-agnostic query building capabilities.

ozzo-dbx Summary Description Requirements Installation Supported Databases Getting Started Connecting to Database Executing Queries Binding Parameters

Ozzo Framework 551 May 9, 2022
HTTP Session Management for Go

SCS: HTTP Session Management for Go Features Automatic loading and saving of session data via middleware. Choice of server-side session stores includi

Alex Edwards 1.1k May 7, 2022
Go session management for web servers (including support for Google App Engine - GAE).

Session The Go standard library includes a nice http server, but unfortunately it lacks a very basic and important feature: HTTP session management. T

András Belicza 107 Feb 16, 2022