Installing not yet used packages #303
Description
go version go1.8 linux/amd64
I was starting a new project and decided to give dep a whirl, so this experience is from my first moments with the tool
I started with a noop main.go, ran dep init
which produced an empty lock/manifest which seemed about right, then attempted dep ensure github.com/gorilla/mux
which gave an error of sorts, with no packages being added to vendor/
dep: No constraint or alternate source specified for "github.com/gorilla/mux", omitting from manifest
So I attempted to manually specify a constraint: dep ensure github.com/gorilla/mux@^1.3.0
which gave no output but did add the dependency to the manifest. However no packages were added to vendor or the lock file.
With a bit of trial and error I found that I have to use the package in my project before it exists to have dep install it.
The main reason I want to install a package first as it allows editors to provide code completion, but it's also just habit from other tools/languages (npm, cargo, glide etc)